Prevent Blogger Blog from Redirecting to Country Specific URLs

Blogger Blog Redirecting to Country Specific URLs :
The Blogger blog your are visiting may redirect to country specific URL. Suppose if you visit smartbloggertips.blogspot.com in India then it will redirect to smartbloggertips.blogspot.in and if in Australia, it  will redirect to smartbloggertips.blogspot.au . Like this all Blogger blogs will redirect to country specific domain URLs.

What is the use with redirections :
If the content in a particular page on your Blogger blog is not suitable to particular country then Google will block only that page, not entire your blogger blog, in that particular country with redirections.

How to Prevent/Stop Blogger Blog From Redirecting to Country Specific URL

We can prevent Blogger blog from redirecting to country Specific domains/urls by adding 'ncr' to your Blogger blog url. ncr means "no country redirect". In this post I'm showing you how to prevent your Blogger blog from redirect to country specific urls using 'ncr'. It is very simple to follow. You just need to add small script code to your Blogger blog.

Fallow below steps to prevent Blogger blog from redirecting to country specific URLs


Step 1 : Go to Blogger Dashboard

Step 2 : Click on Template

Step 3 : Click on Edit HTML

Step 4 : Add below code above </body>

<script type="text/javascript">
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr(blog.lastIndexOf("."));
if (ctld != ".com") {
var ncr = "http://" + blog.substr(0, blog.indexOf("."));
ncr += ".blogspot.com/ncr" + slug;
window.location.replace(ncr);
}
</script>

Step 5 : Click on Save template.

After adding above script code to your Blogger, then your Blogger blog will not redirect to country specific do main urls.

No comments:

Post a Comment