Follow us on Facebook

Prevent Blogger from Redirecting your Blogspot Blog to Country-Specific URLs

Google redirects Blogger blogs to country-specific domains. For instance, if you open in your browser, you might be redirected to if you are located in India or to if you access the same blog from UK. Google does country-specific redirection for selective censorship – they can block a blog in one country but still serve that page in other geographic regions.

blogger countries
My traffic logs suggest that country-specific redirection in Blogger is now live in at least 15 countries. Here’s a complete list:
India [], Australia [], UK [], Japan [], New Zealand [], Canada [], Germany [], Italy [], France [], Sweden [], Spain [], Portugal [], Brazil [], Argentina [], Mexico []

Prevent Blogger from Redirecting to Country-Specific Domains

This country based URL redirection is likely have some negative effect to your Blogger blog. For example:
  1. The social stats – or Facebook Likes, Google +1s and Tweet counts – for your blog stories may be reduced as the URLs for the same blog post become different from different visitors.
  2. You will have a similar problem if you are using an external commenting platform like Disqus or Facebook Comments.
  3. Also, if canonicalization isn’t implemented properly, it may cost you some Google juice as external websites may link to your country-specific pages.
If you are not happy with the idea of Blogger redirecting your blog to a different URL, you can add the following piece of code to your Blogger template and it will always serve the .com address to your visitors irrespective of their geographic location.
Go to your blog inside the Blogger Dashboard and choose Template. Then click the “Edit HTML” button followed by “Proceed.” Next, copy-paste the following code into the template after the <head> tag.
  1. <script type="text/javascript">
  3. /* Get the full URL of the current blogger page */
  4. var blog = document.location.href.toLowerCase();
  6. /* Do not redirect if the domain is .com already */
  7. if (!blog.match(/\.blogspot\.com/)) {
  9. /* Replace the country TLD with .com and ncr switch */
  10. blog = blog.replace(/\.blogspot\..*?\//, "");
  12. /* Open the new URL in the current tab */
  13. windows.location.replace(blog);
  15. }
  17. </script>
Click the Save Template button and now your Blogger Blog will always serve with the URL.
What the JavaScript snippet does is this – it get the URL of the current Blogger page and if isn’t served from the .com domain, it replaces the country specific TLD (like or with the URL. It also adds the /ncr switch to force-redirect the visitor to the address.
[5/4/2015] – The snippet is now more efficient and can handle both www and non-www blogspot URLs including those served from secure HTTP (https).
Share on Google Plus

About Naresh Sahu

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment


Post a Comment

Blog Archive