If you are using Blogger Blogspot, you might have noticed that Google redirects Blogger Blogspot sites to country specific URLs.
For example, if you open a blog whose URL is http://saibatudomt.blogspot.com, it gets redirected to http://saibatudomt.blogspot.com.br, since I am from Brasil. Similarly, a visitor from UK would see http://saibatudomt.blogspot.co.uk and so on.
In a nutshell, Google implemented country specific domains so that is a site need to be blocked in a certain country but made available on others.
But for bloggers, it creates issues especially with social stats like Facebook Likes, Tweet counts, Google+ and even Facebook comments.
Therefore, many users prefer to disable the domain redirection. In this post we will see how to implement Blogger from redirecting to country specific domains. Please note that the country domain redirection only applies if you are using Blogger without custom domain.
How to disable country specific redirection of Blogger Blogspot sites?
To disable Blogger from redirecting to country specific URLs, the following code is applied to the Blogger HTML template in the <head> section. You can place it right after the opening head tag <head>.
- Go to Blogger dashboard
- Theme> Edit HTML
- Find <head>
- Copy the following JavaScript code and paste it right after <head>
<script type="text/javascript"> //<![CDATA[ !function(){var o,t=document.location.href.toLowerCase();t.split("/").length<5&&((o=(o=(o=t.indexOf("://")>-1?t.split("/")[2]:t.split("/")[0]).split(":")[0]).split("?")[0]).match(/\.blogspot\.com$/)||(o=t.replace(/\.blogspot\..*?\//,".blogspot.com/ncr/"),window.location.replace(o)))}(); //]]> </script>
You’ll need to enable blogger https redirection: