When I moved from Beta Blogger to WordPress, I also switched domains1.

This brought pain in two forms:

  • broken backlinks from other sites, which isn’t good, and
  • search engine penalties for duplicate content.

Neither were easily resolvable because of the differences between WordPress and Blogger, and because Blogger is no more a real hosting solution than LiveJournal is.

I owe some of the deeper and more hardcore knowledge to reading How to redirect Blogger Beta to WordPress.com, although it still differs from the approach for a self-hosted WordPress installation.

1. Dealing with Permalink Structures

As aforementioned in Part 1, the way that Blogger and WordPress create permalinks are nearly completely at odds with each other.

This resulted in me changing the “post slugs” of various high-profile articles to a Blogger-compatible version, so that a redirect from arachnejericho.com to spontaneousderivation.com could be made nearly straight. If you are wise, read part 2 to get information about this nice plugin that takes care of the problem….

2. Setting up Forwarding

I first set up a <meta> http refresh tag in the template of my Blogger site, by editing the HTML of the template and inserting this just after the <head> tag:

<meta content='6;url=http://www.spontaneousderivation.com/' http-equiv='refresh'/> 

After 6 seconds, browsers should redirect to spontaneousderivation.com.

3. Soothing Search Engines

Google and other search engines will penalize sites with duplicate content, often by determining the original site and then not showing the duplicate site in the search results. Avoiding this means setting up a 301 Permanently Moved directive in your .htaccess file.

However, Blogger offers no access to the .htaccess file. And therein lies the rub.

The only other path to take is to add after the earlier <meta> tag:

<meta content='NOINDEX, NOFOLLOW' name='ROBOTS'/>

Google will still penalize the new site, until it re-indexes the old site and finds this, which tells it to drop the old site out of the search engine, which un-penalizes the new site since there’s no longer duplicate content.

That’s the theory, anyways. It hasn’t happened yet for Spontaneous Derivation, and it’s been a couple weeks. When the Google search for chinese tonic soup has the new Spontaneous Derivation in the results, rather than the old site, will be the day when… well, when some of the old site is being dropped from the search index, anyways.

4. Altering the redirection URL

Individual post pages from the old site needed to forward to the corresponding page on the new site. However, the permalink structure is different from one to the other; and how the endings of those permalinks are constructed is different from WordPress to Blogger.

This is necessary if you don’t get the plugin alluded to early in part 2. And maybe it’s still necessary, if that doesn’t work. This is still necessary if you want the redirects to hit the individual post pages on your new site, with or without the neat plugin.

I hacked the template code so that Javascript was produced that would change the location.href appropriately before the redirect, so that the redirect was using the WordPress permalink structure. (Along with changing the names of the post slugs on WordPress itself).

This step requires expanding all widgets when you edit the template HTML. I followed the steps here, but the code did not quite work. It turned out, after more investigation, there was more I needed to do.

Under Settings > Archiving, I switched to Monthly archives.

Then under Settings > Formatting, I changed the timestamp format to be “day/month/year”, such as “1/27/2008″.

The new code to be added under Edit HTML, with Expand Widget Templates checked, also needed to be different—WordPress pads with 0s and Blogger doesn’t, so where WordPress expected ’01′ for the month, Blogger had ’1′. A right mess, so this is what I ended up inserting after &lt;b:section class=&#39;main&#39; id=&#39;main&#39; showaddelement=&#39;no&#39;&gt; :

<b:widget id='Redirector' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<b:loop values='data:posts' var='post'>
<script type='text/javascript'>
var new_page=&#39;www.spontaneousderivation.com/&#39;;
var permalink = &#39;<data:post.url/>&#39;;
var timestamp = &#39;<data:post.timestamp/>&#39;;
timestamp = timestamp.split(&#39;/&#39;);
if (timestamp[0].length &lt; 2) { timestamp[0] = &#39;0&#39; + timestamp[0]; }
timestamp = timestamp[2]+&#39;/&#39;+timestamp[0]+&#39;/&#39;+timestamp[1];
new_page = permalink.replace(/www\.arachnejericho\.com\/200[0-9]\/[0-9]{2}/,new_page+timestamp);
new_page = new_page.replace(/\.html$/,&#39;&#39;);
document.location.href = new_page;
</script>
</b:loop>
</b:if>
</b:includable>
</b:widget>

Using this method I was indeed successful in getting all my important backlinks to remain. A good demonstration of this is Passing the Three-Month Mark, a retrospective post with “internal” links that still point to arachnejericho.com, but redirect successfully to the correct single post page on spontaneousderivation.com.

Then I spent most of the night fixing post slugs, but probably you won’t have to do that with the wp-maintain-blogger-permalinks plugin. I assume. I haven’t tried it.

Post-Mortem

Conclusions:

  1. I should never have bought a domain through Google and associated with a Blogger blog. The entanglement is difficult to get out of, more difficult than with just a Blogspot address—real domain names cost money.
  2. It would be quite nice if WordPress installations implemented the same kind of redirect that WordPress.com has which accommodates Blogger imports, by allowing hits with the old Blogger slugs to redirect to the new WordPress slugs.
  3. Wish I knew about wp-maintain-blogger-permalinks, but not sure it would have helped or hindered as I tried to figure out yet one more new thing.
  4. No one should have to code in XML.
  5. arachnejericho.com will need new special redirects again, in the form of Apache rewrite rules, when I rescue it from Blogger, and will need them indefinitely.

Anyways, it’s all done, here I am, and one day far away Google may actually resurface this site when people search for Chinese tonic soup.

1 Warning: Registering domains with the Google/GoDaddy combo is a little weird. Maybe too weird. On day, when I can manage it, and when it matters more, I’m going to rescue arachnejericho.com and crimeandviolins.com and whisk them away to some real hosting solutions.

Photography: Osbornb

  • del.icio.us
  • StumbleUpon
  • Google Bookmarks
  • Reddit
  • BlinkList
  • Twitter
  • Facebook
  • Digg
  • Yahoo! Bookmarks
  • Propeller
  • Sphinn
  • Tumblr
  • PDF
  • email
  • Add to favorites