Breaking

Sunday 19 June 2016

Stop Blogger from Redirecting to Country-Specific Domains


If country specific redirection affects important factors such as traffic and link juice, and you need those in order to rank well, what  can you possibly do? Well, thankfully, Google has provided a way to get  around this. All you have to do is add an ncr/ to the end of the URL- ncr here stands for No Country Redirect. So basically, it goes frenchlitgeek.blogspot.com/ncr/

That solution is great but do you want your users to always have to do that every time they visit your blog? To eliminate that hassle, and for the good of your site statistics, a simple redirection script will do the trick. Here's how:

Instructions

1. Log in to your Blogger account
2. Click on Template → Edit HTML

3. Find the tag in the HTML editor by opening the search box using Ctrl + F.


4. Copy the redirection code seen below after the 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>



5. Click on "Save Template"

No comments:

Post a Comment