Saturday, October 24, 2015

Stopping Blogger Redirect To Country Specific URL

Country Codes - Stopping Blogger Redirect To Country Specific URL
Country Codes


One of the things that Google does with the blogs on blogspot subdomain is that it redirects it to country specific domains. Which means if you are in India you will see a www.stuff-heap.blogspot.in instead of www.stuff-heap.blogspot.com.

I Saw this on my blog, whenever I try to open the .com domain it gets converted into .in which was annoying. I checked the rank of both the domain on alexa which were different which made me think why this thing happens.

So I searched google for it and found out that Google has started this sort of redirect way back for many countries. So that if one country impose censorship on blog it will only be banned in that country and the readers of other countries doesn’t get affected by it.

But for the SEO point of view it’s not so good as Google is treating both the URL different so does others. Which can impact your blog negatively. Also this thing only affect the blog with .blogspot domain not if you have purchased custom domain for your blog.

There are different negative effects of this redirection to your website which includes:

  • Reduction in Stats of Facebook likes, +1 in Google+
  • Problem with different services you uses in your blog like Disqus Comment System.
  • Problem with Adsense Earnings as complained by some users.
  • Link Juice issue as the the backlinks will be redirected to country specific domain not the .com which is good for SEO of that country URL not the blog.
Read More About
Link Juice: post-name
Disqus: post-name

Now you know the how much this can really affect the health of your blog. So here’s the script which you have to add to your webpage to stop it to redirect to country specific URL. Copy the script below and paste it inside <head></head> of your blog. I would advice to paste it at the starting so that it becomes the first thing to be checked before loading other content of the blog.

<script type="text/javascript">
  var blog = document.location.href.toLowerCase();
  if (!blog.match(/\.blogspot\.com/)) {
     blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");
     window.location.replace(blog);
  }
</script>

Explanation

  • Got the blog address from the address bar and converted it to lower case
  • Then checked for the condition if blog doesn't match for .com in the url
  • If yes then do nothing else replace it with .com/ncr
ncr means No Country Redirect.countries.

No comments :

Post a Comment