Friday, April 6, 2012

How to Redirect Blogger Blog .in Domain to .com Easily

Recently, Blogger announces a Country Specific URL's redirection for all BlogSpot domains. Instead of the blogspot.com domain extension, your readers will see their country specific domain extensions. The redirection currently implemented on India and so far all blogspot.com domains redirecting to blogspot.in.

For example: If you are viewing a blog with address blog-name.blogspot.com from Australia (AU), then you will be redirected to blog-name.blogspot.com.au. Similarly, if you are viewing from India it will be redirected to blog-name.blogspot.in.

This redirection is called "country-code Top Level Domain" (ccTLD). It also knows as "302 Redirect" which is a temporary change and not a 301 redirect which is a permanent change of address...

To disable this 302 country specific domain redirection you need to add little code to your blog template to deal with this redirection and stick to blogspot.com. Let's follow below steps to disable 302 redirection from blog.


How to Disable Country Specific Domain Redirection in Blog
  1.  Go to your Blogger Dashboard click on ---> Design tab ---> Edit HTML tab.
  2. Make sure to take backup of your Template before making any changes to your HTML.
  3. Now click on Expand Template Widgets check box.
  4. Search for </head> code in your Template. .
  5. Copy and Paste the following code BEFORE the </head> and Save your template and see the URL..
  6.  
    <script type="text/javascript">
     if ((window.location.href.toString().indexOf('.com/'))=='-1')
     { window.location.href = window.location.href.toString().replace('.blogspot.in/','.blogspot.com/ncr/').replace('.blogspot.com.au/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/'); }
     </script> 


If you Like It then Please Share It To all........

4 comments:

  1. thanks........

    i have applied your applied script for url redirect. it is easy way to redirect blog url....

    many many thanks to you !!!

    Md. Naiyar Azam

    ReplyDelete
    Replies
    1. Follow my Blog and you will always get the updated internet marketing techniques

      Delete
  2. I was search this code for a long time to chnage my drupal developer blog. Thanks for sharing with us.

    ReplyDelete
  3. Thanks for the script, its working now..

    ReplyDelete