Rewrite rules from one domain to another one
-
I have moved he site from a server to another one, changing the domain name. The page names are the same, so in every urls you will have only a differnce in the domain name not in the rest of url.
I would like to use rewriterule in the htaccess file to tell to everyone, especially to search engines, that I have now new urls.
I have found this code, but I'm not sure it could be the right one in my case
RewriteEngine On RewriteRule ^(.+)$ http://nuovodominio/$1 [R=301]
Thanks to anyone could help me. Ciao, bob
-
Very helpful Robert. Thank you and ciao. Bob
-
Bobrock4
First, you need to 301 url to url as a best practice. Second, you need to understand that the more difficult issue is you changed domain name and that may cause Google, etc. to take a little longer to credit the 301 (due to bad practices in the past). That said, there is a great resource on moz that considers whether you are on a LAMP stack or microsoft, etc.
The link is in Learn SEO and is better than just giving you a rewrite rule as it will allow you to comprehend what is happening and why.
I hope you find this helpful.
Robert
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Which better to rank with 40 DA domain redirect the domain 301
hello, which better to rank with 40 DA domain redirect the domain 301 to my website or host domain and create posts with my website link + if i do the 301 redirect the Crawl Errors of old 40 da domain will display on my new website or not+how much links can i get from one website pbn
Technical SEO | | cristophare79
+
which better get links for home page or postsbest regards ,0 -
Followed Linking Root Domains and No Followed Linking Domains
If you have more NoFollowed Linking Root Domains than Followed Linking Root Domains is that a problem?
Technical SEO | | INN0 -
We just recently moved site domains, and I tried to set up a new campaign for the new root domain, but it threw an error?
It threw an error saying we cannot access the SERPs of this site? Any reason why? It is an https:// site instead of the http://, but even our older domain had an https://
Technical SEO | | josh1230 -
Will This Domain Change Hurt
I have a potential client that is looking to change their domain for branding reasons, but does not want to lose their solid SERP position. I'm not concerned about links continuing to pass juice as he was (though I am concerned about the link profile). What I am concerned about is domain age (moving from a 4 year old domain to one that has just been parked for 4 years but not used, or one that is currently just a redirect to his site), and the fact that his current URL is an EMD. He is using his state (only really does work there), plus two solid keywords in the domain, and wants to switch to brand name with one of the two solid keywords he was using. My initial thought is "if it's not broke, don't fix it." How worried should I be about rankings if we change this domain. Thanks for the help, and fire back any questions. Sorry I'm a little vague.
Technical SEO | | DeliaAssociates0 -
Domain Hosting
I'm currently working with a client who provides products in Ireland Is it massively beneficial for the sited to be hosted on an irish server or will there not be much difference with it being hosted in England?
Technical SEO | | Sandeep_Matharu0 -
Domain Forwarding Implications
Hi, I am working with a client who is planning to rebrand the company and set up a new domain. What is the best way to maximize and pass the authority from the existing sites (there are 2)? Each site already has many inbound links and have been around for a while. Should I set up 301 redirects for all of the pages? Should I set up domain forwarding? If I do this, what are the implications from an SEO perspective? Please advise. Thank you, Erin
Technical SEO | | HiddenPeak1 -
Redirecting domain to the main domain (hosting cost?)
Hello Everyone, I have the following situation. There is main domain and a secondary domain that is related to the page on the main domain. I want to integrate the content of the secondary domain into the page on the main domain and redirect the secondary domain via 301 to that specific page. As i understand I can do it via .htaccess using rewrite mechanism. http://www.seomoz.org/learn-seo/redirection But the question is does it mean I have to keep paying for the hosting for the secondary domain? Because htaccess has to be located on the web server so I would need a hosting plan for it? Is that true? Is there any way around it? P.S. to avoid any confusion - I am talking about hosting plan - not domain registration fees
Technical SEO | | SirMax0 -
New Website and Domain Question
Hi all, I am launching a new website around the end of October and I have purchased a great domain to use for it. My question is should I put some kind of holding page up to try and start building up some domain authority in preperation for launch? Or maybe a blog at www.domain.com/blog and then keep all the blog content at the same location when the full site goes up? Or is it best to wait and just launch the site when the first version is complete? Thanks, Ben
Technical SEO | | BenInder0