How to redirect blogger pages from one page to another page of same or a different blog?

by Ankur Jain on June 10, 2009

As we all know blogger doesn’t provide an option for 301 redirect on a page by page basis. The only option left with us is meta refresh redirect.

Say you want to redirect http://xyz.blogspot.com/2008/11/about.html to http://www.xyz.com/about/

Here is the code that you will need:

<b:if cond='data:blog.url == &quot;http://xyz.blogspot.com/2008/11/about.html&quot;'>
<meta content='0;url=http://www.xyz.com/about/' http-equiv='refresh'/>
</b:if>

Some points to note:

  • You need to place this code just before the head section closure ie before </head>  tag.
  • Take note of spacing before and after equals to sign and also there should be two (==) and not one (=) equals to sign.
  • content = 0 means. The browser will wait for 0 seconds before redirecting to another page.

{ 11 comments… read them below or add one }

Simply Indonesia January 8, 2010 at 3:20 PM

Beautiful, thanks

Reply

Google Image Blogger April 16, 2010 at 7:27 AM

Thanks a lot. I’ve tried this and it works quite well.

Reply

Avinash maurya August 13, 2010 at 6:43 PM

No doubt tht is post is good and very helpful but thr is a lag in switching. Can the small delay be erased?

Reply

Glendon Mellow October 23, 2010 at 8:49 PM

Thanks! This worked, although I briefly see the original page before it switches over to the other website I’m redirecting to.

I wish it was a function of Blogger by default.

Thanks for your help!

Reply

priya November 29, 2010 at 5:56 PM

Hi,
Thanks,
There is one problem taht is my page is redirect on my domain but my old blog page is not shown there.also when am open my new site then page cannot displayed

Reply

Cybermac78 February 7, 2011 at 10:54 PM

Great, it has been very usefull to me! Thank you very much for your effort! Cheers!

Reply

Alison March 3, 2011 at 12:13 AM

Effective and quick to implement. Thank you very much for sharing your knowledge!

Reply

Meg April 7, 2011 at 4:46 PM

Awesome! Thanks for this fab bit of code it did the trick and saved the day!!

Reply

Elal | The Shades of Grey September 26, 2011 at 11:50 AM

Working perfectly. Very helpful! :)

Reply

mike September 30, 2011 at 1:57 AM

TEMPLATE ERROR: Unterminated string literal in [data:blog.url == "http://www.forhuntersbyhunters.com/p/forhuntersbyhunters-custom-turkey-calls.html;] before 100

Reply

Wisco November 12, 2011 at 12:53 AM

Exactly what I was looking for. Thanks!

Reply

Leave a Comment

Previous post:

Next post: