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
-
Could the EMD update affect my domain?
My domain is: http://www.freescrabbledictionary.com/ "Scrabble Dictionary" is a huge keyword in my niche where I used to rank top 4. Do you see this domain as possibly being hit by the EMD? My Google Analytics does not show that I was initially hit back in Sept 2012 when it first same out.
Technical SEO | | cbielich0 -
Forum on a Sub-domain - Thin Content?
I have wordpress blog installed on my Domain and now I intent to start a Forum. I understand that the content on the forum would be thin-content which may attract Google Penalties. So, would it be wise to start the forum on a sub-domain to avoid any penalty. My query is:- 1. If the content on the sub-domain is thin, can it impact my main domain as well. 2. Should I install the forum on a sub-domain or an entirely different domain so as to avoid any penalty? My preference is a sub-domain provided google does not levy any penalty I also intent to display RSS Feeds of the Forum on the Home Page of the Website.
Technical SEO | | cakaranbatra0 -
Should we 301 redirect our old domain to the new domain
We have a product that when started was under the domain appnowgo.com. We've since changed the name and the domain is now knackhq.com. The latter domain doesn't rank nearly as well as the former for many of the keywords we are targeting. For example... "online database builder" and "web app builder" are two of those keywords. Obviously having app in the domain is not a bad thing but it is our old name. The question is, should we 301 the appnowgo.com domain to knackhq.com? Or should we use that better rank and just link users to knackhq.com from the appnowgo.com site until we can increase our ranking for knackhq.com? We don't plan to update the content on appnowgo.com anymore and we obviously don't want to drop off rank if at all possible. Thanks! Eric
Technical SEO | | sitestrux0 -
Domain Aliases
Hi there, I've got two sites mysite.com and mysite.org .org is indexed by google, .com doesnt seem to be. .com is used for some material that is sent out, and accounts for about 20% of incoming visotors. (80% end up on .org) Is there any positive or negative effect from this? Would I benefit from 301'ing the .com to .org?
Technical SEO | | dencreative0 -
Mobile Domain Setup
Hi, If I want to serve a subset of pages on my mobile set from my desktop site or the content is significantly different, i.e. it is not one to one or pages are a summarised version of the desktop, should I use m.site.com or is it still better to use site.com? Many thanks any help appreciated.
Technical SEO | | MarkChambers0 -
IPs and Domains
If a domain loads on the domain and the IP is that a problem? So it loads on domain.com and 69.16.....com Thanks!
Technical SEO | | tylerfraser0 -
I have mulitple domains that are both drawing traffic and that I should only have doing that. my question is how do I make one go away?
First off I am VERY new to his SEO stuff and If you guys could be so kind as to help. I was setting up my first campaign for my web site and when i entered it into the URL search it came back with having 2 web sites that it searched. Both are mine but one has the "www.website.com" and the other just has the "website.com" how can i fix this so i just have one? thanks in advance for your help
Technical SEO | | madabouthats0 -
URL Rewrite
Using the .htaccess file how do I rewrite a url from www.exampleurl.com/index.php?page=example to www.exampleurl.com/example removing index.php?page= Any help is muchly appreciated
Technical SEO | | CraigAddyman0