Disable Blogger Country Specific Domain Redirection

Recently, Blogger introduces a Country Specific URL's redirection for all BlogSpot domains. Instead of the blogspot.com domain extension, your readers will see their country specific domain extensions. The redirection currently implemented on India and so far all blogspot.com domains redirecting to blogspot.in.

For exmaple: If you are viewing a blog with address blog-name.blogspot.com from Australia (AU), then you will be redirected to blog-name.blogspot.com.au. Similary, if you are viewing from India it will be redirected to blog-name.blogspot.in.

This redirection is called "country-code Top Level Domain" (ccTLD). It also knows as "302 Redirect" which is a temporary change and not a 301 redirect which is a permanent change of address.

Disable Blogger Country Specific Domain Redirection


To disable this 302 country specific domain redirection you need to add little code to your blog template to deal with this redirection and stick to blogspot.com. Let's follow below steps to disable 302 redirection from blog.

How To Disable Country Specific Domain Redirection in Blog

1. Go to your Blogger Dashboard click on ---> Design tab ---> Edit HTML tab.

2. Make sure to take backup of your Template before making any changes to your HTML. (More Info On: How To Backup Blogger Template.

3. Now click on Expand Template Widgets check box.

4. Search for below code in your Template. More Info On: "How To Find A Code In Blogger Template".
</head>
5. Copy and Paste the following code BEFORE the </head>.
<script type="text/javascript">
if ((window.location.href.toString().indexOf('.com/'))=='-1')
{
window.location.href = window.location.href.toString().replace('.blogspot.in/','.blogspot.com/ncr/').replace('.blogspot.com.au/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/');
}
</script>
6. Save your template and see the your URL.

If you still see the redirection, then please use our comment form to submit your questions we will help you out in this....

54 comments:

  1. thank you , the problem is solved i dont see the redirection

    ReplyDelete
  2. @ tuni-mag - That's great it worked for you and thanks for the comment.

    ReplyDelete
  3. Many thanks Ravi: that seems to have solved the problem.
    I confess I had a bad moment when my link broke completely, but I had simply neglected to replace my country codes with the ones in your sample code.
    Never underestimate a newbie's talent for killing the cure! :-)

    ReplyDelete
    Replies
    1. @ Jonny Jacobsen - Thanks Jonny, Now you can feel relax and keep doing happy blogging. Thanks for the comment.

      Delete
    2. I may have spoken too soon. Although the fix seemed to work well from my end, readers in Australia, Mexico and Britain have reported being unable to get access to the blog now. As one would-be reader put it: "infinitecomplacency.blogspot.com seems to redirecting to a different address infinitecomplacency.blogspot.co.uk and back again in a sort of infinite loop."
      I've tried adapting your solution to include the co.uk URL (I initially fixed it just with .fr as I'm based in France) And I'm waiting to hear back. But I'm wondering if the solution might be in your earlier post on country-specific URLs: the canonical tag?
      Reluctant to do more until I've had some feedback from my last tweak, but I'd be interested to have your opinion.
      Jonny

      Delete
    3. @ Jonny Jacobsen - I have checked your blog you have not added code properly. and about canonical tag it used to fix social counts and facebook comments issues..which were not showing correct count after blogger changed their country specific redirection. you have to follow both articles to fix both issues.. Add me as a author will do it for you, once it corrected then remove me.. invite me at ravisaive.in@gmail.com

      Delete
    4. I don't know if you got my email, but have added you to the author's list: thank you for your help.

      Delete
    5. @ Jonny Jacobsen - Got but grant me admin privileges to edit HTML.

      Delete
    6. My apologies: have sent you the necessary by email.
      jj

      Delete
  4. Hi Thanks for sharing this. I think I have followed all your steps, but when I try to go back in after saving, its stuck trying to find the page. I noticed that I seems to still be searching for co.uk instead of .com? when I type my address in?? should be http://jfroog.blogspot.com. Please please help jenny

    ReplyDelete
  5. I tried this on www.democracystreet.blogspot.co.uk after saving my original template as suggested, but now the site is innaccessible either as www.democracystreet.blogspot.co.uk or www.democracystreet.blogspot.com. Help!
    Simon s.j.baddeley@bham.ac.uk

    ReplyDelete
    Replies
    1. @ Simon Baddeley - I think you not added code properly i see it showing country specific URL, Add me as a author to your blog and i will do it for you..

      Delete
  6. @ Simon Baddeley - Yeah its working still you facing problem, then remove the code or add me as a author to your blog i will do it for you..

    ReplyDelete
  7. Same here, followed the steps it just goes into a stuck loop and won't open

    ReplyDelete
    Replies
    1. @ John - Don't worry just tell me your blog link i will provide you updated code according to your country specific domain.

      Delete
  8. Replies
    1. @ d@ve add this below code before </head> and save your template.

      <script type="text/javascript">
      if ((window.location.href.toString().indexOf('.com/'))=='-1')
      {
      window.location.href = window.location.href.toString().replace('.blogspot.in/','.blogspot.com/ncr/').replace('.blogspot.com.au/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/').replace('.blogspot.ca/','.blogspot.com/ncr/');
      }
      </script>

      Delete
    2. Ravi, I have tried this multiple times, and the followers widget still does not show my 97 followers. My URL corrected though.

      Delete
    3. @ Ian - Please provide your blog URL, let me check if needed will provide you correct code for you.

      Delete
  9. Worked great for me by changing .blogpsot.ca/ with .blogspot.co.uk

    Thanks a bunch!

    ReplyDelete
    Replies
    1. @ Komal - Hey that's great it worked for you and thanks for the lovely comment.

      Delete
  10. Hi Ravi,

    Thank you for the trick. The only problem is that I have seen that in the Statistics section of the Blogger control panel, there are a lot of visits that will be counted twice (one for the .com.es [in my case] and another one for the redirection to .com) and the sources of the visit will be often the .com.es domain...

    Have somebody found a solution to this?

    In addition, the counter of the "Like" Facebook button have a different number if the domain is .com.es or .com.

    Thank you for reading :D

    ReplyDelete
    Replies
    1. @ Jordi - Add this below code before </head>.

      <script type="text/javascript">
      if ((window.location.href.toString().indexOf('.com/'))=='-1')
      {
      window.location.href = window.location.href.toString().replace('.blogspot.in/','.blogspot.com/ncr/').replace('.blogspot.com.au/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/').replace('.blogspot.es/','.blogspot.com/ncr/');
      }
      </script>

      Delete
    2. @Ravi,

      I did it and the redirection is correct, but the problem is the double count on each visit (for the first visitor of the blog, or if you have cleaned your explorer cookies).

      Well, for the moment I have accepted the .com to .com.es redirection, I think that it won't be a good solution.

      Thank you anyway, your post was very helpful!

      Delete
  11. Ravi, I have tried the change from blogspot.ca to blogspot.com/ncr/ and it doesn't work for me. Any ideas?
    Thanks,
    -=Ian=-

    ReplyDelete
    Replies
    1. @ Ian - Don't worry I will help you out just add me as a author to your blog will do for you. once its corrected remove me..Ok

      Delete
  12. Thanks! Is a great solution and works fine. The only problem whit this code is that in the stats I lost the referring links, from where the visitors came from. The referring links would allways be myblog.blogspot.com.es, myblog.blogspot.com.ar, etc. Any one knows how to solve this??

    ReplyDelete
  13. Thank you, Ravi. It works perfectly!

    ReplyDelete
  14. Hi Ravi,

    tried your html code and didn't work .. realized afterwards I never changed the code you wrote to include my country .ca ... back to .com

    Returned to the google site and saw a post that said to change it in the address bar .com/ncr ... the .com returned and so did my pencil tool.

    A BIGGER Problem occurred ... it now takes ~10minutes for my page to load!!! THAT's worse than the other problem!

    How would you advise to correct it? Thank you in advance for your time and effort!
    Sandra

    ReplyDelete
    Replies
    1. @ The Epicuream - I have checked your blog seems that you have not added code correctly. its looping now.. Add me as a author to your blog will correct it.

      Delete
    2. tell me how to do it :-) and it's done ... thank you!!!

      Sandra

      Delete
    3. Hey Ravi ... the problem was the mess up with "kontct me" some of the code was missing ... very strange with what Google did! Page loads quickly now!!!! Thanks for your stand by and assistance :-)

      Delete
  15. I did it but have only inserted the code related to my country (and deleted the rest). And it functions!!!! THANKS!!!!!
    Buttons work too (e.g. Facebook, g+, etc.), have only problems with Tweetmeme and now try to find out why...

    ReplyDelete
  16. Well... Tweetmeme doesn't allow redirection... Anybody knows how to fix it?

    ReplyDelete
    Replies
    1. @ Aguaya - You should use canonical tags for tweetmeme to work. Please follow this article like we did for Facebook comment issue problem. same way it should work for you.. if you apply properly. if you don't know how to do that add me as a author to your blog i will do it for you. send invite at ravisaive.in@gmail.com

      Delete
  17. Thank you Ravi. With your script I could get the editing links back to all posts and widgets. :)

    ReplyDelete
  18. Replies
    1. @ Cherry Top - Good it's worked for you too..

      Delete
  19. nice trick.But will it work for long period.I had an experience ,when i used a code by amit[labnol.org] it only worked for 2 days ,then the website is not loaded.Please give a reply

    ReplyDelete
    Replies
    1. @ Tune2tech - It will work forever. 100% guarantee.

      Delete
  20. Wow working.......thanx admin for this nice article

    ReplyDelete
  21. Thanks i tried many...finally it worked for me.

    ReplyDelete
  22. thank you VERY much! :)

    ReplyDelete
  23. I tried in my blogspot its not working :(.. My blog url is getting bounced back and forth.

    ReplyDelete
  24. Well just discovered that Facebook wouldn't let me post links to a .blogspot.co.uk URL. After some frantic searching found this site and changed the HTML and all seems to be fine now! THANK YOU!!!

    ReplyDelete
  25. Thank you so much for helping us out. It took me a while to figure out how to add my country code but it worked eventually!!!
    For newbies like me, I just changed the IN (code for India in the first example) with my country code and deleted all the rest.

    Thank you so much!

    ReplyDelete
    Replies
    1. Dear Iulia,

      I am glad that my code worked.. Thanks for comment..keep visiting for quality posts..

      Delete
  26. followed the steps it just goes into a stuck loop and won't open my blog is
    http://governmentandpvtnaukri.blogspot.in/

    ReplyDelete
  27. @ Nitin Dwivedi - I've checked your blog its opening fine..

    ReplyDelete
  28. check now actually due to this problem i deleted that code but now i again pasted check now

    ReplyDelete
  29. check this http://governmentandpvtnaukri.blogspot.in/2012/09/rrc-nwr-group-d-recruitment-nwr-rrc.html
    or this
    http://governmentandpvtnaukri.blogspot.in/2012/09/nis-chennai-recruitment-2012-2013.html

    ReplyDelete
  30. Hi Ravi, i have the same problem, i copy your code but it seems that it cant redirect to my blogspot. im from singapore and i dont want to redirect it to .sg thanks please help

    ReplyDelete