Tuesday 3 July 2012

How to Disable Blogger From Country Specific URL Redirection ?

As we all know recently blogger blog get redirected to country specific URL from the .com URL. The redirecting URL depends by the country we visit from. for example if we are visiting from India URL will be blogspot.in from Japan it will be blogspot.jp.

Because of this Blogger redirection our social stats like Facebook Like and Twitter Tweet counts are different for different countries. So if you want to block blogger from country specific redirection just apply this simple hack.

Method:
1. In your Blogger dashboard Click Template > Edit HTML > Proceed
2. Now find <head> tag.
3. And paste the below script just after the <head> tag

 <script type="text/javascript">  
 var blog = document.location.hostname;  
 var slug = document.location.pathname;  
 var ctld = blog.substr(blog.lastIndexOf("."));  
 if (ctld != ".com") {  
 var ncr = "http://" + blog.substr(0, blog.indexOf("."));  
 ncr += ".blogspot.com/ncr" + slug;  
 window.location.replace(ncr);  
 }  
 </script>  

4. Click Save Template Done !

That's all Now check your blog No More Blogger URL redirection !

1 comment:

  1. Thanks for giving the solution...my disqus was broken

    ReplyDelete