Monday 28 May 2012

0

Always Redirect Your Blogger Blog To blogspot.COM

  • Monday 28 May 2012
  • Tanmay Kapse
  • |
    Recently Google changed a lot of things along with their policies. Google started redirecting blogger blogs to country-specific URL.Lets consider that you have open anyblog.blogspot.comin your browser, you might be redirected to anyblog.blogspot.in if you are located in India or to anyblog.blogspot.com.au if you access the same blog from Australia.It is not a new thing since few days that your blogspot.com blog may redirect to a country based domain. Perhaps it is worldwide. Every blogger blog owner may have the same problem of automatic redirection. So here in this post, we have a tweak that enables your blog to stay on blogspot.com URL. 


    How To Redirect Your Blogger Blog To .Blogspot.Com?

    We will apply this hack with using very short JavaScript. 
    1. Go to Blogger Dashboard > Design > Edit HTML.
    2. Take a backup/download your template.
    3. Find for </head> tag.
    4. Add below piece of JavaScript code just above </head> tag.

    <script type="text/javascript">
    var blog = document.location.hostname;
    var slug = document.location.pathname;
    var ctld = blog.substr(blog.lastIndexOf("."));
    if (ctld != ".com") {
    var ncr = "http://" + blog.substr(0, blog.indexOf("."));
    ncr += ".blogspot.com/ncr" + slug;
    window.location.replace(ncr);
    }
    </script>


    Now save your template.
    Now your Blogger Blog will always redirect to the blogspot.com URL.

    That was the simple solution for a big problem. I hope you all will like this hack.

     

    Stay Connected With Free Updates

    Subscribe via Email

    0 Responses to “Always Redirect Your Blogger Blog To blogspot.COM”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Please Do not Spam

    Receive Free Updates Via Email. Subscribe Now!