Blog Domain Migration to Teck.in – The Effort Behind

In the previous post, I mentioned the plan to write detailed steps I followed for the blog migration. This is post is more of technical (web development) in nature, and may not be interesting to many of my readers. I am keeping this post short. If you are planning to migrate your blog or website and have some questions/doubts, please feel free to send me your doubts.

Blogger

Though I have a domain and hosting service, still use the Blogger.com service. A few changes in Blogger.com settings were required for the migration – Publishing FTP details, blog URL, Archiving options and Site feed. Edited the Blogger template wherever I was referring to the old blog URL directly.

FeedBurner

I have been using FeedBurner for providing RSS and email subscriptions. This makes the migration easy. The existing subscribers do not need to subscribe again. I just need to update FeedBurner with the blog’s new Atom/XML URL. I also updated the contents of the confirmation email to show the new blog URL in the automated email from FeedBurner.

Google PageRank

While moving the hosted blog to the new location, how do I point the pages to the new location and still maintain the PageRank? I used 301 permanent redirection. But my hosting service does not allow setting up a lot of 301 redirects in their web server. So I did some programming in PHP to capture the 404 from the old blog server (ananthapuri.com), and 301 redirect to the new domain (teck.in). The 404.php is set uas the 404 File Not Found handler in the old server. This scripting could be done in any language supported by your hosting service.

I am not writing in detail the technical solution, as it will be understood by whoever really want to know that detailed, right? The following file, 404.php is set as the default 404 handler URL at Ananthapuri.com, which in turn redirects the request to teck.in whenever a search result or bookmarking or linking leads to the old URL.

<?php
$arrMoved=array(
“http://www.ananthapuri.com:80/blog/2007_07_01_archive.html”=>
“https://teck.in/monthly/2007_07_01_archive.html”,
“http://www.ananthapuri.com:80/blog/contact_sree_pillai.html”=>
“https://teck.in/contact.html”,
“http://www.ananthapuri.com:80/blog/”=>
“https://teck.in/”,
“http://ananthapuri.com:80/blog/2007_07_01_archive.html”=>
“https://teck.in/monthly/2007_07_01_archive.html”,
“http://ananthapuri.com:80/blog/contact_sree_pillai.html”=>
“https://teck.in/contact.html”,
“http://ananthapuri.com:80/blog/”=>”https://teck.in/”);

$request=strtolower(substr($_SERVER[“QUERY_STRING”], 4));

if(array_key_exists($request,$arrMoved))
{
$newurl=$arrMoved[$request];
$headercode = “HTTP/1.0 301 Moved Permanently”;
$headerloc = “Location: “.$newurl;
}
else if( strcasecmp( substr($request,0,41),
“http://www.ananthapuri.com:80/blog/upload”) == 0)
{
$newurl = substr_replace($request, “https://teck.in/image”, 0, 41);
$headercode = “HTTP/1.0 301 Moved Permanently”;
$headerloc = “Location: “.$newurl;
}
else if( strcasecmp( substr($request,0,37), “http://ananthapuri.com:80/blog/upload”) == 0)
{
$newurl = substr_replace($request, “https://teck.in/image”, 0, 37);
$headercode = “HTTP/1.0 301 Moved Permanently”;
$headerloc = “Location: “.$newurl;
}
else if( strcasecmp( substr($request,0,34), “http://www.ananthapuri.com:80/blog”) == 0)
{
$newurl = substr_replace($request, “https://teck.in”, 0, 34);
$headercode = “HTTP/1.0 301 Moved Permanently”;
$headerloc = “Location: “.$newurl;
}
else if( strcasecmp( substr($request,0,30), “http://ananthapuri.com:80/blog”) == 0)
{
$newurl = substr_replace($request, “https://teck.in”, 0, 30);
$headercode = “HTTP/1.0 301 Moved Permanently”;
$headerloc = “Location: “.$newurl;
}
else
{
$headercode = “HTTP/1.0 404 Not Found”;
$headerloc = “Location: http://www.ananthapuri.com/404.asp”;
};
header($headercode);
header($headerloc);
header(“Connection: close”);
exit();

?>

After these changes, I also added the new blog URL in Technorati. Technorati does not support updating the blog URL.

Next step is to add the new URL in Blogger, IceRocket and other blog search engines. Also, added to other generic search engines like Google. Since I have setup the 301 Permanent Redirect, even without submitting, the new URL will be updated in the search index.

I use Google Adsense for advertising. Updated the channel information in Adsense for tracking teck.in specific revenue.

Updated the sitemap file for Google Sitemap to point to the new domain and uploaded to Google Webmaster Central. This will make sure that all pages are indexed on time.

The new URL is added to Google Web Analyzer (urchin) for tracking visits and pageviews specific to the domain

Submitted the new URL to the technical blog section of DMOZ and waiting for approval.

As I moved the blog to a new location, the Alexa Ranking needs to be built up again. There is no way of transferring the alexa ranking to the new URL. Updated the name, contact information and thumbnail in alexa for Teck.in.

After all these changes and moving to the new domain, the traffic did not go down drastically. The change would have caused 5% reduction of organic search traffic due to the fact that the new domain have not assigned a PageRank yet in Google indexes. Overall, I feel teck.in gets good amount of traffic and the Adsense revenue is keeping its pace. The migration was very smooth.

Be the first to comment

Leave a Reply