Followers

How to Disable URL Redirection in Blogger? (Better Codes)


Blogger is a weblog-publishing service that permits multi-user blogs with time-stamped entries. It became developed by Pyra Labs, which changed into bought by Google in 2003. typically, the blogs are hosted by means of Google at a sub-domain of blogspot.com. A user can have as much as a hundred blogs in keeping with an account.

As the Google have started redirecting the blogger blogs to country specific domain, many of blogger users are going through issues because of negative affect on Google juice (Bookmarked hyperlinks, external hyperlinks of your blogs) and social stats (like tweet counts, Facebook stocks and Google +1’s).

The country specific re-route lets in google to have greater control on blogs management in distinct countries.
Available Solutions:


  • Use Custom Domains: The users who are using custom domain will not be affected, since their url structure will remain the same and it will not be redirected ( Refer this).
  • Adding ‘ncr’ slug to blog url: Adding a ‘ncr’ slug to your blog url stops the redirection and it shows the actual domain address.
For example opening http://abc.blogspot.com in India will open http://abc.blogspot.in,

However, if you open http://abc.blogspot.com/ncr in any country it will simply open the same url i.e. http://abc.blogspot.co
 
 How to Disable URL Redirection in Blogger?

I recently found a code snippet to add ncr slug to your blogger url. Follow the below steps:

#1: Open Blogger dashboard and select template
#2: Click on ‘Edit HTML’ and then Proceed

#3: Add following code in between <head> tag:
Javascipt


<script type='text/javascript'>
// Disable URL Redirection in Blogger Codes
// Design Devta | http://DesignDevta.Blogspot.Com/
var str=window.location.href.toString();if("-1"==str.indexOf(".com/")){var str1=str.substring(str.lastIndexOf(".blogspot."));if("-1"==str1.indexOf("/"))var str2=str1;else var str2=str1.substring(0,str1.indexOf("/")+1);window.location.href=window.location.href.toString().replace(str2,".blogspot.com/ncr/")}
</script>
#4: Click on Save Template and its done.

Previous
Next Post »