Blog Lab : A TechDroider.com website | All about blogging , seo , earning money from internet and more !

Monday, 2 November 2015

How to Prevent Blogger from Redirecting to Country-Specific URLs

with 1 comment



Most of us have seen that Blogger usually redirects Blogspot url to Country-Specific URLs . For example if you are living in India , and if you will open -

www.TechDroiders.blogspot.com

Then this above url will be redirected to -

www.TechDroiders.blogspot.in

But now you can Prevent Blogger from Redirecting to Country-Specific URLs .

How to Prevent Blogger from Redirecting to Country-Specific URLs -

Step 1. Go to Blogger Dashboard and Choose Template .

Step 2. Click Edit HTML

Step 3. Search <head> tag .

Step 4. Copy and Paste below html code under <head> Tag .


<script type="text/javascript">
var blog = document.location.href.toLowerCase();
if (!blog.match(/\.blogspot\.com/)) {
blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");
window.location.replace(blog);
}
</script>

Step 5. Click on Save .

Thanks to labnol.com for sharing this trick . Now your Blogspot url will not be redirected to any country specific url !


1 comment: