Blogger

How to Disable Blogger from Redirecting to Country-Specific URLs


Google, as most would know, redirects Blogger blog to country-specific domains. For instance, if you open example.blogspot.com in your browser, you might be redirected to example.blogspot.au if your location in Australia or to example.blogspot.uk if you access the same blog from United Kingdom.

The main reason why Google implemented country-specific redirection is selective censorship - they can now easily block a blog, or a particular page on blog, in one country but still serve it in other regions.


This article will show how to prevent your blog from redirecting to country-specific domains.

1- Go to Blogger Dashboard
2- Go to Template  >>  Edit HTML
3- In the HTML code box, press Ctrl+F, then Type:
<head>

4- Copy and paste the following code into the <head> tag


<script type="text/javascript">
   var blog = document.location.hostname.split(".");
   if (blog[blog.length - 1] != "com") {
      var ncr = "http://" + blog[0] + ".blogspot.com/ncr";
      window.location.replace(ncr + document.location.pathname);
     }
</script>

5- Click Save Template

Now your Blogger Blog will always serve with the blogspot.com URL.


0 comments:

Post a Comment

Powered by Blogger.