3rd October 2009

Changed domain? Help Google and save Page Rank

I recently changed my blog domain from sha.re.it to 36flavours.com and wanted to try and preserve my Google Page Rank with help from their Webmaster Tools, which provides a Change of Address tool.

This tool tells Google that it’s the same site, just a new domain. Unfortunately for me, they don’t recognise “.re.it” as a root level domain, so was unable to make use of this feature.

Instead I have to rely on a 301 redirect. If, like me, you’re using cPanel and have the old domain as a parked domain it will not issue a 301 header, however you can override this in your .htaccess file.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?sha.re.it$
RewriteRule ^.* "http\:\/\/36flavours\.com\/$0" [R=301,L]

Here we check to see if the domain is sha.re.it or www.sha.re.it and if so, redirect to http://36flavours.com with the 301 header.

Leave a Reply

Categories

Twitter

About Me

“I have a geek lifestyle, except geeks don’t have a life. Or style!”

Hi, my name is Steve and this is my blog. I am a web developer based in the United Kingdom. I like (X)HTML, CSS, Flash, ActionScript3, PHP, JavaScript, MySQL, [paste trendy words here] and Mapping APIs.