Tutorial : Moving a website permanently with SEO-friendly
The best way to move a website permanently and SEO-friendly is using 301 redirect. Or if you have two domain names like, example.com and example.co.uk and what you want is, every time user comes to example.co.uk the website should redirect automatically to example.com. The answer is 301 redirect.
1. create a .htaccess file in your root directory of the domain name that you want to move.
2. place this code
1 2 3 | Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] |
Change www.newdomain.com to your new domain name.
Please be sure that you are using Apache as a web server, because we are using mod_rewrite.
Tags: 301, apache, mod_rewrite, redirect