Translate

Disable 302 Redirection to Country Specific Domains

Leave a Comment
As many of you may know, Google is continuously releasing updates in order to improve its services, particularly in the area of generating better search results. In Jan 31, 2012 Google started to implement Country-Specific url redirects to Blogger.

What is that mean?

In simple terms, if you are viewing a blog with an address such as example.blogspot.com from France (FR), then you'll be redirected to a .fr domain: example.blogspot.fr. Similarly, if you are viewing from United Kingdom it will be redirected to example.blogspot.co.uk.

This might sound like no big deal—who cares what a blog URL ends with, right? Wrong. Google’s motives are something any serious blogger should care about in this case; this is happening so that Google can easily block any content which is not appropriate for a specify country according to the law of that country, and can easily serve that same content in another country without any issues. This is an act of “selective censorship” being perpetrated against writers without their consent. If you have ever tried to watch a video that is freely available in, for example, the United States, from just about anywhere else, you know the frustration this kind of behaviour can cause—the video is often blocked to you for no real reason beyond outdated international copyright laws, laws drafted long before the internet existed that have simply refused to adapt in a timely manner.

More seriously, many countries with tyrannical governments employ censorship to help control the populace and restrict their access to information that could seriously aid them in their fight against oppression. Who wants to allow their blog to be censored in a nation simply because its government has arbitrarily decided to isolate and brainwash its populace? The beauty of the internet is that it is based on the freedom of unbiased information, and this is a mission that we, as writers, are bound by duty to uphold.

This country based URL redirection also has negative consequences for your blog itself.
This forced redirection causes your Alexa Traffic Rank will to be separated to different domains. This redirection is  a "302 Redirect" which is a temporary change, and not a 301 redirect, which is a permanent change of address. So, even if you are not bothered about content restriction issues, for better search engine optimization (SEO), you need to fix this issue or risk a loss of exposure.

Thankfully, there is a way to do so; you do not have to let your blog fall victim to censorship and the enforcement of antiquated laws. To fix this problem, you must also employ the following piece of code, adding it to your template; it will ensure that your blog always serves the .com address to your visitors.

Disable Blogger Redirection to Country Specific Domains:

Go to Design -> Edit HTML and search for "</head>".
Now copy and paste the following code BEFORE the </head> tag.
<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>
Save your template and you are ready :)
Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment

Popular Last 7 days

Powered by Blogger.

Subscribe