Tuesday, February 28, 2012

How to redirect blogger blog to blogspot.com address


How to redirect blogger blog to blogspot.com address

This is a guest post from Darssh. Darssh is a Blogger, Entrepreneur and Internet Lover.

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.

Well, first of all let’s answer the question. Why a .com redirect to a ccTLD (Country Specific Top Level
Domain) URL may hurt you? This is because according to MR. Search Engine Optimizer’s law, you can’t
host the same content on different domains. If you are using blogger on your own top level domain,
then there is no point of worry. But if your blog has a .blogspot.com address in its tail, then it may hurt
you.

So, let’s get into the answer now. Here is the simplest JavaScript code (Pretty short too!) that you can
use to save your blog from being redirected:

if ((window.location.href.toString().indexOf('.com/'))=='-1') {
window.location.href =

window.location.href.toString().replace('.blogspot.in/','.blogsp
ot.com/ncr/');
}


Sign into www.blogger.com (Dashboard), click the down arrow Blogger dashboard down arrow drop down menu, select TEMPLATE,

Blogger Dashboard Settings Template

click on EDIT HTML to open the template editor,

Blogger Dashboard Settings Template Edit HTML template editor

and place the given code in the Header section, for example, just before the </head> tag and your blog will no longer have that country specific address and will instead remain as, for example, blog.blogspot.com and not blog.blogspot.in anymore.

Demo

Note: This code is for stopping .blogspot.in redirects. You need to change it to your own country’s TLD.

16 comments:

  1. Hi Darssh,
    That is the new thing, what I read today. If you redirect .in domain to .com then, could we control our old PR, what was it for .com domain.

    ReplyDelete
  2. Thanks a lot...should the code be placed in every blog post or can we change something in the settings?

    ReplyDelete
  3. Divya, Darrsh is the author of this guest post but I would think that you only have to put that code in the template and not in every post.

    ReplyDelete
  4. @a guy from bloggertips

    Yes the same PR will be preserved. The Google redirects your blog for load balancing purposes only.

    @Divya

    Yes you need to put it in your HTML template at once, not in all blog posts. Peter sir is right.

    ReplyDelete
  5. Helpful post Thank u dear..

    i have also created some very much helpful posts on my blog please check

    ReplyDelete
  6. thnx bro.. it is very usefull.. for social sharing
    it shares .com domain.

    i have tried on my blog
    "photo-control.blogspot.in"

    ReplyDelete
  7. Lovely post. Lets see how to redirect blog to another blog. Click Here

    Visit my blog: Shine Mat

    ReplyDelete
  8. Excellent Post!! Very useful for blogger..
    Now I can redirect my old blog to new one simply...
    Visit My Tech Blog: <a href="http://bangbd.blogspot.com>BangBD<a/>

    ReplyDelete
  9. where should we paste the code?
    In the body or head?(or any other?)

    ReplyDelete
    Replies
    1. I have same question Mahroof Ali...

      Delete
  10. I have also same question Mahroof Ali and Devi

    ReplyDelete
  11. where should I paste the code?

    ReplyDelete
  12. Hello Everyone.

    You need to paste the code in the header section of your blog.

    Thanks.

    ReplyDelete
  13. Hey dude, its not working! what to do further? Drupal developer

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics