Skip to main content

How To Prevent Country Specific URL Redirection In Blogger

Google redirects blogger blogs to country-specific domain i.e. if you're in United Kingdom and viewing blogenia.blogspot.com, you will be redirect to blogenia.blospot.co.uk.

URL redirection is a technique to make a web page available for more than one URL.

Google says, "We are doing this to provide more support for managing content locally. If we receive a removal request that violates local law, that content may no longer be available to readers on local domains where those laws apply."


If you are not happy with the idea of Blogger redirecting your blog to a different URL, you can add the following code to your Blogger blog and it will always serve the .com address to your visitors irrespective of their geographic location.

How it works:

Go to your Blogger Dashboard and choose Template, backup your template then click the “Edit HTML” button. 

Login > Blogger dashboard > Template > Edit HTML

Now, paste the following code into the template just after the <head>.
<script type="text/javascript">
  /* 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);
  }
</script>
Click the Save Template button.

You are Done!!

Now your Blogger Blog will always serve with the blogspot.com URL. If you have implemented this trick then share your reaction on this topic. Thanks :)

Comments

Popular posts from this blog

Killer WhatsApp Tricks That You Should Know

WhatsApp has become the best messenger for mobile platform. Not only it is available for every mobile platform but also it is the most used app in these platforms too. The popularity of WhatsApp has grown so much popular that many WhatsApp tricks are coming to internet and many users are searching for these amazing WhatsApp hacks to use in their phone and amaze their friends.  So, here we go: 1. Disable WhatsApp Auto Image Download Though earlier, WhatsApp plus app was required to stop automatic downloading of images, videos and audio files but now, WhatsApp has added this option to its settings. So, you can control automatic media files downloading. Just navigate to More > Settings > Chat Settings > Media auto-download  Check suitable option at ‘When using mobile data’, ‘When connected’ on Wi-Fi’ and ‘When Roaming’. 2. Hide WhatsApp Last Seen Last seen timestamp is great feature but the feature comes out to be really very annoying because i...

How To Remove Powered By Blogger Attribution

Blogger is the most popular blogging platform. However, its Templates contains an official Attribution which shows that the blog is the product of Blogger.

How To Remove "Read More" Link In Blogger

"Read More" option makes your blog more professional, but some expert says, it affects your blog's page rank. So here's a short tutorial on how to remove that link.