Inspired? No home

Blogger Blogspot To Wordpress Redirection plugin

Download the plugin at Wordpress.org

Unfortunately Blogger can not do a proper 301 redirect. It used to do it with a custom domain earlier but now it will return a 301 redirect without a new location and display a 'do you want to be redirected' message to visitors. Maybe Google will follow the link, maybe not. Maybe the pagerank will be transferred, maybe not. I don't know and as I have my doubts I choose another solution, which should be noted is generally not recommended but I feel it is only choice in this case.

Enter the META refresh.

Thought this was something forgotten in 1994 by everyone except news-sites who wants extra pageviews for ad impressions? Oh, no, not with Blogger. As the custom domain 301 is not acceptable solution for me using a meta refresh is the only way to redirect visitors and search engines to my new site. Hopefully Google will follow it to but since this approach is a technique often used by SEO black-hat spammers it might not properly transfer my pagerank to my new domain. Anyway, here's how to implement:

Go to the layout section. Revert to a class template. Remove all content and insert the following (modify url's before /redirect to match your new blog url):

<html dir="<$BlogLanguageDirection$>">
<head>
 <title>301 Moved Permanently</title>
<noscript>
<ItemPage><Blogger><meta http-equiv="refresh" content="0,url=http://blog.inspired.no/redirect/?url=<$BlogItemPermalinkURL$>"></Blogger></ItemPage>
<MainOrArchivePage><meta http-equiv="refresh" content="0,url=http://blog.inspired.no"></MainOrArchivePage>
</noscript>
<script type="text/javascript">
document.location.href = "<ItemPage><Blogger>http://blog.inspired.no/redirect/?url=<$BlogItemPermalinkURL$></Blogger></ItemPage><MainOrArchivePage>http://blog.inspired.no</MainOrArchivePage>";
</script>
<meta name="robots" content="noindex,follow" />
<style type="text/css">
#navbar-iframe {
display: none;
}
</style>
</head>
<body>This page has moved to
<ItemPage><Blogger><a href="http://blog.inspired.no/redirect/?url=<$BlogItemPermalinkURL$>">blog.inspired.no/redirect/?url=<$BlogItemPermalinkURL$></a></Blogger></ItemPage>
<MainOrArchivePage><a href="http://blog.inspired.no">blog.inspired.no</a></MainOrArchivePage>
</body>
</html>

This will redirect all request to your blogspot to your new domain to a resource called redirect. This is not found in Wordpress but using two plugins we can grab the request and redirect to a proper url. The main plugin is called Blogger Redirector and finds the correct based on the same permalink url used in Blogspot. However since we are using a META refresh on blogspot and there is no way AFAIK to get only the path to the post with the Blogger data fields - just the entire url, we need to redirect using yet another plugin. As there was no such plugin when I started this migration I had to write my own. You can find my plugin 'Blogger Blogspot To Wordpress Redirect' over at Wordpress.org. Basically just install the plugin and follow the instruction for Blogger above.

But there is already a similar plugin called 'Blogger to Wordpress Redirection'?

It redirects to the main page like this:

oldblog.blogspot/my-post => newblog.com => newblog.com/my-post 

It is basically saying that the root resource on newblog.com has moved to newblog.com/my-post. Which is not correct. Therefore I prefer using a redirect resource which will redirect to the correct post based on a url with the Blogger permalink: newblog.com/redirect/?url=http://oldblog.blogspot.com/my-post

Also my plugin requires no customization unlike 'Blogger to Wordpress Redirection' which requires you to edit the plugin php code to work.

Why not just use the 'Blogger Redirector'?

The required 'Blogger redirector' will work perfectly in Wordpress if you set up a custom domain. However as mentioned earlier this will display a 'do you want to be redirected' message to visitors and not redirect search engines crawlers. If you can live with that then keep the custom domain redirect in Blogger.

Written on 28 December 2008.
blog comments powered by Disqus