If you “Google” moving a website to a new domain or setting up 301 wildcard redirects with .htaccess; you’re going to get a lot of random scripts that may or may not work.
Some .htaccess redirects specify the domain you are leaving, which as a result will not work if the referring domain is not an exact match. This is not good if say you have multiple parked domains that you want all redirect to the new site.
Below is a redirect that will take anything pointed to your directory and redirect it to your new site. It is the best script I’ve found for a wildcard direct without error.
Why is this important?
Because if you make any changes to your website that results in 404 errors, then your site will take a search engine rankings hit. Proper 301 redirects will limit the impact of a domain change or change in permalink structure.
#Redirect from old domain to new domain
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
I offer website support for small businesses at an affordable price. If you are in need of website assistance, please feel free to contact me to learn how I can help you improve your website rankings and convert more clients.