Prevent Blogger from redirecting to other domains


Those of you who use Google Blogger know that the company redirects the blogs to the domains of the country where the URL is displayed.country domain Blogger

For example, if you want to open iguru.grspot.com in your web browser, Google will redirect you to iguru.grspot.gr if you are in Greece, or to iguru.grspot.co.uk if you open the page from the United Kingdom Kingdom.

Prevent Blogger from redirecting to other domains

These directions in the country of the person concerned are likely to pose problems to Blogger blogs.

For example:

Social statistics - like Facebook like, or Google's + 1s and the number of Tweets, can be reduced as the URLs for the blog itself are different for different visitors.

The same problem will be if you use an external platform for your blog comments, such as Facebook or Disqus, because the blog's URLs will be different even when the underlying page is the same.

But not just the above, some users have reported a dip in their profits from Google AdSense, as blog pages started to be served by domains by country.

So, if you're not happy with this Blogger's behavior redirecting your blog to different URLs, you can add the following code after your head.

Let's see how:

From the Blogger Dashboard, select Template. Then click on "Edit HTML", and "Continue" or "Proceed." Copy and paste the following script into the Template after opening the head. That is, after


 

    

      /* Get the full URL of the current blogger 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);
      }
    
    

Next, click Save Template. So your Blogger page will always open with domain blogspot.com.

Registration in iGuRu.gr via Email

Enter your email to subscribe to the email notification service for new posts.


Read them Technology News from all over the world, with the validity of iGuRu.gr

Follow us on Google News iGuRu.gr at Google news