Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two domains, a new domain (newdomain.com) and and old legacy domain (olddomain.com). I want to safely redirect the old domain to the new domain. Easy enough.

At the moment I am doing this using htaccess ModReWrite like so

# Redirect WWW's
RewriteEngine On
RewriteCond %{HTTP_HOST} !^newdomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

Which basically says rewrite any domain that isn't the new one, to the new one. I'm not 100% sure if this is safe for search engines? Should I redirect the old domain separately?

share|improve this question
add comment

2 Answers

This is correct for SEO. Search engines will update their database that the old URL has changed to the new URL. You should leave it active like that for at least several months to they all get a chance to update, and visitors can still use the old URL.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.