How To Stop Blogger From Redirecting To Different Countries URL

As you know when you open your blog from other country its URL become change e.g you are in Pakistan and visit your blog (http://rizwanbakhtiar.blogspot.com) it will be the same, but you come from other country like Canada it will be (http://rizwanbakhtiar.blogspot.ca).



There are many users who want to stop redirecting to different countries URL, so i am posting a trick with that they can stop it. But before it you should know that what are the affects when it redirects to another country's URL.


  • There will be reduction in social stats, because if something is posted on Facebook or Google+, it will be different depending on where your readers are from.
  • If you use any other commenting system like Disqus then it will create trouble because your URL is set up on default URL.
  • It will also cause to making reduction in Google Adsense earning.

How To Stop Blogger From Redirecting To Different Countries URL :

Follow these simple instructions to stop redirecting.


  • Login to Blogger
  • Click on Template and then Edit HTML
  • Click anywhere in code and press CTRL+F to search </head> tag.
  • Paste the following code just above </head> tag.
  • You're done !
Code :

" <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> "

Save Your Template !

No comments:

Post a Comment