It is not a new thing since few days that your blogspot.com blog may redirect to a country based
domain. Perhaps it is worldwide. Every blogger blog owner may have the same problem of automatic
redirection. So here in this post, we have a tweak that enables your blog to stay on blogspot.com URL.
Well, first of all let’s answer the question. Why a .com redirect to a ccTLD (Country Specific Top Level
Domain) URL may hurt you? This is because according to MR. Search Engine Optimizer’s law, you can’t
host the same content on different domains. If you are using blogger on your own top level domain,
then there is no point of worry. But if your blog has a .blogspot.com address in its tail, then it may hurt
you.
So, let’s get into the answer now. Here is the simplest JavaScript code (Pretty short too!) that you can
use to save your blog from being redirected:
Sign into www.blogger.com (Dashboard), click the down arrow , select TEMPLATE,
click on EDIT HTML to open the template editor,
and place the given code in the Header section, for example, just before the </head> tag and your blog will no longer have that country specific address and will instead remain as, for example, blog.blogspot.com and not blog.blogspot.in anymore.
Demo
Note: This code is for stopping .blogspot.in redirects. You need to change it to your own country’s TLD.
domain. Perhaps it is worldwide. Every blogger blog owner may have the same problem of automatic
redirection. So here in this post, we have a tweak that enables your blog to stay on blogspot.com URL.
Well, first of all let’s answer the question. Why a .com redirect to a ccTLD (Country Specific Top Level
Domain) URL may hurt you? This is because according to MR. Search Engine Optimizer’s law, you can’t
host the same content on different domains. If you are using blogger on your own top level domain,
then there is no point of worry. But if your blog has a .blogspot.com address in its tail, then it may hurt
you.
So, let’s get into the answer now. Here is the simplest JavaScript code (Pretty short too!) that you can
use to save your blog from being redirected:
if ((window.location.href.toString().indexOf('.com/'))=='-1') {
window.location.href =
window.location.href.toString().replace('.blogspot.in/','.blogsp
ot.com/ncr/');
}
window.location.href =
window.location.href.toString().replace('.blogspot.in/','.blogsp
ot.com/ncr/');
}
Sign into www.blogger.com (Dashboard), click the down arrow , select TEMPLATE,
click on EDIT HTML to open the template editor,
and place the given code in the Header section, for example, just before the </head> tag and your blog will no longer have that country specific address and will instead remain as, for example, blog.blogspot.com and not blog.blogspot.in anymore.
Demo
Note: This code is for stopping .blogspot.in redirects. You need to change it to your own country’s TLD.
I am very pleased to find this blog. I want to thank for your time for this wonderful read!!! Keep Sharing, I'll surely be looking for more.
ReplyDelete