Pages

January 31, 2014

How to Stop Blogger Blog From Country Specific Redirection

If you have a blogger blog and you live in one of the 15 country's (India, Australia, New Zealand, etc) you must be knowing that Google has started country specific redirection of the blogger websites. How to stop country specific redirection?


How to stop blogger blog from country specific redirection. Techcodify.blogspot.com


For example if you open xyz.blogspot.com you will be redirected to xyz.blogspot.in for india and xyz.blogspot.uk for united kingdom. Google has started this for selective censorship and some other reasons.

Negative Consequences of country specific redirection

This redirection has some real negative affects on your blogger blog if you blog for money and trying to target a large number of audience.
  1. Same website will have different ranking in different country's. 
  2. Your social sharing count will also be affected as the shared url is country specific.
  3. Websites backlink count will also be affected.

How to Stop Blogger Blog From Country Specific Redirection

You just need to paste the following code in your blogger template. But first take a backup of the template.

<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>
  1. Go to your blogger dashboard. Click on the template tab and then click on edit.
  2. Click ctl+f and type </head>.
  3. Paste the code and save it.
Here ncr specifies No Country Redirection and it will force you website url to be redirected to .com url.
Comment and share.


4 comments:

  1. What if I want my blog to show up as .ca to all visitors? My sister has a beauty blog and she lives in Canada so when she posts her content on social media, the links show up as blogspot.ca. What if I want to stop all country redirects and instead force blogspot to show all content with the .ca country extension, not .com? Would I change these couple of lines of code like this?

    if (ctld != ".com") { to if (ctld != ".ca") {

    and

    ncr += ".blogspot.com/ncr" + slug; to ncr += ".blogspot.ca/ncr" + slug;



    ReplyDelete
    Replies
    1. Hi Paulette
      I tested it on of my test blog and it worked.
      I would suggest you to first download the template of the blog and then do the above steps. Also, I would advice you to keep it .com instead of .ca coz many peoples don't click on the website that has a country specific redirection.

      Do comment if you need any other help.

      Delete
  2. didn't worked for me :(
    PS. found the error
    var ctld = blog.sustr(blog.lastIndexOf(".")); // substr instead , writing mistake in your code .. now works, great, many thanks !

    ReplyDelete