Migrate your site with a 301 redirect

To try and keep things all in one place (and lessen the costs of domain purchasing) I’m going to be moving this website over to blog.lukearl.com at some point in the near future.

To keep things nice with the folks over at Google (ie. try to not lose search rankings) we’re going to make use of 301redirects.

This article on webconfs.com entitled How to redirect a web page gives the following information on using your .htaccess file to send the users over to your new home:

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.

The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

If you want all the incoming requests just to jump straight to a single web page then use this:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]