Don't Miss!!

Friday 24 February 2017

Disabling Blogger to Country Domain Redirecting

Hey guys, in this tutorial am gonna show you how important it is to disabling blogger to country domain redirecting. If your blog is using blogspot sub-domain then you will see that outside of the country visitor will not see your site as .com. e.g: Visitors from Kenya will see you address as example.blogspot.ke or South African visitors will see it example.blogspot.za

It's somehow frustrating since using the local domain Google receives some benefits but you will not receive any benefit on your side. Rather, you will loss your ranking and it will have effect on alexa ranking because it will count different ranking per county redirecting domain and that's not good for your site. At the same time, it will effect on with your facebook like, twitter sharing etc.



So, let's see how we can go by and manage to disable this redirecting.

How to Use:-

  • Login to your Blogger site
  • Then go to Template>Edit HTML
  • Click anywhere inside the code area
  • Press CTRL+F from keyboard
  • After press, you will see a search box, there write this <head> code and press enter
  • Now copy following code and paste after the <head> tags


<script type="text/javascript">

// Works on both http/https links

/* Get the full URL of the current blogger homepage or other page */
var blog = document.location.href.toLowerCase();

/* Do not redirect if the domain is .com already */
if (!blog.match(/\.blogspot\.com/)) {

/* Replace the country TLD with .com and ncr switch */
blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");

/* Redirect to the new .com URL in the current tab */
window.location.replace(blog);
}

</script>

  • Then click on Save template and you are done.


You all set to enjoy the SEO benefit of getting higher ranking in search engine. Happy blogging my friends.

No comments:

Post a Comment