Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two domains, a new domain ( and and old legacy domain ( 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 ^(.*)$$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

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

You may find this blog post helpful

share|improve this answer

Your Answer


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.