Pretty posts

If your blog has been created with blogger and used blogspot sub-domain then you will see that outside of the country visitor will not see your site as .com. Exmaple: Indian people will see it example.blogspot.in or Italian visitor will see it example.blogspot.it.

Why Disable Blogger Country Domain Redirecting:

By using the local domain Google receives some benefits but you will not receive any benefit. Rather, you will loss your ranking. Firstly, it will effect on alexa rank 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, Today i will share a simple but effective code to disable this redirecting.

How to Use:

  1. Login to your Blogger site
  2. Then go to Template>Edit HTML
  3. Click anywhere inside the code area
  4. Press CTRL+F from keyboard
  5. After press, you will see a search box, there write following code and press enter
  6. <head>
    
  7. Now copy following code and paste after the <head> tags
  8. <script type="text/javascript">
      
      // Work on both http/https
      
      /* 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>
    
  9. Then click on Save template and you are done.

That's it. Now you can check your url by changing .com to .in. Then you will see this simple code magic.