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
-
How to replace a custom platform's homepage with another homepage from another platform domain?
I have a question regarding 301 permanent redirection. I currently have three websites, each hosted by different platform/CMS: one by Wix, another by WordPress, and a custom built CMS. I want to have all my three websites to be under the the custom build CMS's URL. What I am most concerned about is that I would like to have the home page of my Wix website to become my custom build CMS's new home page and the original content currently under my custom build CMS would be updated under new sub directories (in which I have access to the custom build CMS's source code). I have never done a 301 redirect before and I would like to know if there is any additional thing I need to do to my current custom build CMS besides assigning all my current content under my custom build CMS to new directories before executing 301 redirects?
Technical SEO | | sihanedutech0 -
Moving Shopify from a Sub Domain to the Full Domain
Apologies if this has been asked before. Currently we have a Shopify shop on a subdomain shop.lucybee.com a blog on subdomain blog.lucybee.com and the full domain of course. We'd now like to move everything onto Shopify on the full domain. Therefore the blog rolls into Shopify. We'll manually move pages into Shopify. Any advice or links to resources on how to manage would be gratefully received. Thank you , Jim
Technical SEO | | LucyBee0 -
Sudden ranking Hike For domain
Hello there, I have domain Which got penalized By google Before 2 nd half years & all First Page Ranking Gone Down by 7-8 pages, But Now It got Sudden up after 3 years, So my Question is Will I need Worry or that Can Be Positive Sign For My efforts Given to Website? Will It stay Up?? As i have Updated My website As Told by Moz experts. Thanx, in advance
Technical SEO | | innovative10030 -
Magento Rewrite Issue
Moz's Crawler has thrown up a bunch of crawl issue for my site.The site is a magento based site and I recently updated the themes so some routes may have have become redundant. Moz has identified 289 pages with Temporary Redirect. I thought magento managed the redirects if I set the "Auto-redirect to Base URL" to Yes(301 Moved permanently). But this is enabled on my store and I still get the errors. The only thing I could think of was to add a Robots.txt and handle the redirection of these links from here. But handling redirection for 289 links is no mean task. I was looking for any ideas that could fix this without me manually doing this .
Technical SEO | | abhishek19860 -
Which domain should i set up a blog on?
I have a client who uses a .com for there website in Australia. Were now building an external blog which will be on a subdomain. We recently discovered they also own the Australian version of there domain name. Should we build there blog on: blog.currentdomain.com 2) blog.newdomain.com.au Thanks
Technical SEO | | acs1110 -
Multiple Domains pointing to one IP
Hi we have some issues with Multiple domains pointing to one IP. is this considered duplicate content by Google? If so, what is the best thing can we do to avoid this? thanks
Technical SEO | | solution.advisor0 -
Should this site start again on a new domain
Hi We have not done SEO on this site they have used another company who looks like they outsourced and the links have been built by a third party all blog networks and this company have said they cannot get the links removed. Google flagged artificial links on this web site in February and in April it lost over 10000 visitors in a month and its just free falled ever since. The categories have been recreated and no redirects created due to the amount of backlinks from the blog sites to the original category pages but the site is not recovering its down to 1500 visitors a month and used to get 14000 a month. So should my customer ditch the domain and move this site to fresh domain? http://www.kids-beds-online.com Any answers would really be appreciated. thanks Tracy
Technical SEO | | dashesndots0 -
Are multiple links devalued on the same domain?
I'm in negotiations to get links placed on a popular blog with good stats. I'm allowed to pick older posts on the site, and I get to pick the anchor text. Is it best practice to diversify the links by having different keywords pointing to different pages or am I better off pointing as many links as I can at one page (varying anchor text)? Also, is it best to pick a more recent blog post, or is it ok to pick one from say, 2009?
Technical SEO | | MichaelWeisbaum0