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?