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.

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.
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".
If you still see the redirection, then please use our comment form to submit your questions we will help you out in this....
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.
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....
thank you , the problem is solved i dont see the redirection
ReplyDelete@ tuni-mag - That's great it worked for you and thanks for the comment.
ReplyDeleteMany thanks Ravi: that seems to have solved the problem.
ReplyDeleteI 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! :-)
@ Jonny Jacobsen - Thanks Jonny, Now you can feel relax and keep doing happy blogging. Thanks for the comment.
DeleteI 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."
DeleteI'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
@ 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
DeleteI don't know if you got my email, but have added you to the author's list: thank you for your help.
Delete@ Jonny Jacobsen - Got but grant me admin privileges to edit HTML.
DeleteMy apologies: have sent you the necessary by email.
Deletejj
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
ReplyDeleteI 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!
ReplyDeleteSimon s.j.baddeley@bham.ac.uk
@ 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@ 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..
ReplyDeleteSame here, followed the steps it just goes into a stuck loop and won't open
ReplyDelete@ John - Don't worry just tell me your blog link i will provide you updated code according to your country specific domain.
Deletecode for canada please
ReplyDelete@ d@ve add this below code before </head> and save your template.
Delete<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>
Ravi, I have tried this multiple times, and the followers widget still does not show my 97 followers. My URL corrected though.
Delete@ Ian - Please provide your blog URL, let me check if needed will provide you correct code for you.
DeleteWorked great for me by changing .blogpsot.ca/ with .blogspot.co.uk
ReplyDeleteThanks a bunch!
@ Komal - Hey that's great it worked for you and thanks for the lovely comment.
DeleteHi Ravi,
ReplyDeleteThank 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
@ Jordi - Add this below code before </head>.
Delete<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>
@Ravi,
DeleteI 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!
Ravi, I have tried the change from blogspot.ca to blogspot.com/ncr/ and it doesn't work for me. Any ideas?
ReplyDeleteThanks,
-=Ian=-
@ 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
DeleteThanks! 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??
ReplyDeleteJaimiro - Read these articles might solve your problems Google Redirecting Blogs To Country-Specific URL's and Fix BlogSpot Canonical URLs Problems
DeleteThank you, Ravi. It works perfectly!
ReplyDeleteHi Ravi,
ReplyDeletetried 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
@ 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.
Deletetell me how to do it :-) and it's done ... thank you!!!
DeleteSandra
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 :-)
DeleteI did it but have only inserted the code related to my country (and deleted the rest). And it functions!!!! THANKS!!!!!
ReplyDeleteButtons work too (e.g. Facebook, g+, etc.), have only problems with Tweetmeme and now try to find out why...
Well... Tweetmeme doesn't allow redirection... Anybody knows how to fix it?
ReplyDelete@ 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
DeleteThank you Ravi. With your script I could get the editing links back to all posts and widgets. :)
ReplyDeleteIt worked, thank you so much
ReplyDelete@ Cherry Top - Good it's worked for you too..
Deletenice 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@ Tune2tech - It will work forever. 100% guarantee.
DeleteWow working.......thanx admin for this nice article
ReplyDeleteThanks i tried many...finally it worked for me.
ReplyDeletethank you VERY much! :)
ReplyDeleteI tried in my blogspot its not working :(.. My blog url is getting bounced back and forth.
ReplyDeleteWell 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!!!
ReplyDeleteThank 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!!!
ReplyDeleteFor 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!
Dear Iulia,
DeleteI am glad that my code worked.. Thanks for comment..keep visiting for quality posts..
followed the steps it just goes into a stuck loop and won't open my blog is
ReplyDeletehttp://governmentandpvtnaukri.blogspot.in/
@ Nitin Dwivedi - I've checked your blog its opening fine..
ReplyDeletecheck now actually due to this problem i deleted that code but now i again pasted check now
ReplyDeleteYeah dude its working.
ReplyDeletecheck this http://governmentandpvtnaukri.blogspot.in/2012/09/rrc-nwr-group-d-recruitment-nwr-rrc.html
ReplyDeleteor this
http://governmentandpvtnaukri.blogspot.in/2012/09/nis-chennai-recruitment-2012-2013.html
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