If you access any of the Blogger hosted blogs from India, Australia or from a host of other countries, Google will automatically redirect you to the corresponding country specific domain.
For instance, if a blog’s address is xyz.blogspot.com and you try opening that page from an IP address in India, you will be automatically redirected to xyz.blogspot.in. A similar redirection will occur for individual article pages as well.
I have come up with a javascript code that will always serve the .com address to your visitors irrespective of their geographic location
Here’s how you do it.
1. Go to Template > Edit HTML (For old interface : Go to Design > Edit HTML)
2. Search for <head>
3. Paste the following code just below the the <head> tag :
<script>
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.uk/','.blogspot.com/ncr/').replace('.blogspot.jp/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/').replace('.blogspot.ca/','.blogspot.com/ncr/').replace('.blogspot.de/','.blogspot.com/ncr/').replace('.blogspot.it/','.blogspot.com/ncr/').replace('.blogspot.fr/','.blogspot.com/ncr/').replace('.blogspot.se/','.blogspot.com/ncr/').replace('.blogspot.com.es/','.blogspot.com/ncr/').replace('.blogspot.pt/','.blogspot.com/ncr/').replace('.blogspot.com.br/','.blogspot.com/ncr/').replace('.blogspot.com.ar/','.blogspot.com/ncr/').replace('.blogspot.mx/','.blogspot.com/ncr/');
}
</script>
4. Save your template.
Thats it! Now your blog is free from country specific redirection :)
For instance, if a blog’s address is xyz.blogspot.com and you try opening that page from an IP address in India, you will be automatically redirected to xyz.blogspot.in. A similar redirection will occur for individual article pages as well.
How to Prevent Blogger Blogs from Redirecting to Country Specific Domain :
I have come up with a javascript code that will always serve the .com address to your visitors irrespective of their geographic location
Here’s how you do it.
1. Go to Template > Edit HTML (For old interface : Go to Design > Edit HTML)
2. Search for <head>
3. Paste the following code just below the the <head> tag :
<script>
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.uk/','.blogspot.com/ncr/').replace('.blogspot.jp/','.blogspot.com/ncr/').replace('.blogspot.co.nz/','.blogspot.com/ncr/').replace('.blogspot.ca/','.blogspot.com/ncr/').replace('.blogspot.de/','.blogspot.com/ncr/').replace('.blogspot.it/','.blogspot.com/ncr/').replace('.blogspot.fr/','.blogspot.com/ncr/').replace('.blogspot.se/','.blogspot.com/ncr/').replace('.blogspot.com.es/','.blogspot.com/ncr/').replace('.blogspot.pt/','.blogspot.com/ncr/').replace('.blogspot.com.br/','.blogspot.com/ncr/').replace('.blogspot.com.ar/','.blogspot.com/ncr/').replace('.blogspot.mx/','.blogspot.com/ncr/');
}
</script>
4. Save your template.
Thats it! Now your blog is free from country specific redirection :)
nicely done. +1 following.
ReplyDeleteNot sure if this is a good idea considering Google' take on localization of Blogger's blogs.
ReplyDeleteBut nice js code you figured out there!!
Totally agreed with your point. However, I feel that the blog owners should be given a choice to have localization or not.
DeleteThanks, man!
ReplyDeleteHappy to help :)
DeleteI am very happy that I could read this post
ReplyDeleteprivate sex personal
Hi....
ReplyDeleteGo to Blogger and log into your website. When you're viewing the main dashboard, click on 'Theme' in the left hand menu. You'll see a preview of your theme with the option to 'Edit HTML' under the 'Live on Blog' window. Obviously you'll replace yournewwebsite.com with your new url!
You are also read more Instant Loan