Tuesday, April 17, 2012

How to Prevent Blogger Country Specific URL Redirection (302) !!


Recently, Blogger introduces 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-> kumaranvr.blogspot.com
India (IN), then you will be redirected to blog-> kumaranvr.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 —> Template tab —> Edit HTML tab.
2. Now click on Proceed check box.
3. Copy and Paste the following code BEFORE the </head>

<script type="text/javascript">var blog = document.location.hostname;var slug = document.location.pathname;var ctld = blog.substr(blog.lastIndexOf("."));if (ctld != ".com") {var ncr = "http://" + blog.substr(0, blog.indexOf("."));ncr += ".blogspot.com/ncr" + slug;window.location.replace(ncr);}</script>

Click the Save Template button and now your Blogger Blog will always serve with the blogspot.com URL.
This Script Prevent 302 Redirection & force-redirect the visitor to the blogspot.com..

>Follow me on twitter-
http://twitter.com/hackergrp

2 comments:

Mike Bishop7 said...

Thank you for sharing this article Kumaran! You provided some great information on how to prevent country specific redirection. I came across your blog while I was online looking at the possibility of getting a qatar domain, and I'm happy I did because you have provided very useful information. You have helped a lot with my research I'm doing to get my website started, thank you again for sharing.

Anonymous said...

Great beat ! I would like to apprentice while you amend your web
site, how could i subscribe for a blog site?
The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea

my blog post - Elevate GF Muscle

Post a Comment

 
Design by Secure Hackers