Moving from Beta Blogger to WordPress, Part 4: Holding Onto Backlinks

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 <b:section class='main' id='main' showaddelement='no'> :

<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='www.spontaneousderivation.com/';
var permalink = '<data:post.url/>';
var timestamp = '<data:post.timestamp/>';
timestamp = timestamp.split('/');
if (timestamp[0].length &lt; 2) { timestamp[0] = '0' + timestamp[0]; }
timestamp = timestamp[2]+'/'+timestamp[0]+'/'+timestamp[1];
new_page = permalink.replace(/www\.arachnejericho\.com\/200[0-9]\/[0-9]{2}/,new_page+timestamp);
new_page = new_page.replace(/\.html$/,'');
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

Advertisements

10 thoughts on “Moving from Beta Blogger to WordPress, Part 4: Holding Onto Backlinks

  1. I understood about every other word. Plug-ins…blahblahblah…altering…redirecting…blahblahblah.

    If feel like the dog in the Farside cartoon.

    What you say: Bad Ginger. Stop digging up my plants, Ginger.

    What the dog hears: Blah Ginger. Blah, blah, blah Ginger.

  2. LOL. Sorry about that, Mary. This article is a bit hardcore. And I’m a perfectionist; losing my backlinks and having everything stay at the old site were never in my plans.

    Of course, now I’m planning to split everything up into multiple blogs. But at least WordPress will let me—with far more ease, although it’s still a bit hacky—create intelligent redirects.

    *keeps poking the Google algorithm with a stick*

  3. I have followed your example but blogger removes my code after every save? What am I doing wrong? The index page redirects but none of the internal pages do.

  4. Hi Jake!

    When you Edit HTML, make sure that “Expand Widget Templates” is checked. This will reveal your code again, although you will need to search through the text for your URL—Blogger will have done some extra obfuscation, but you will still be able to edit the Javascript.

    Do the internal pages redirect to the wrong place, or do they not redirect at all? (If they redirect to the new site and result in a Not Found page, they are redirecting, just to the wrong place.) In which case you’ll need to look at the new URL to see what’s different. It may be that you need to update your post slugs.

    It’s all rather tricky. It was a frustrating night to me….

  5. It was my fault that it was broken. I forgot to update all of the code and instead of looking and replacing I kept pasting creating multiple instances of the JS.

  6. I’m glad that it’s working out. :)

    This stuff is not easy to do. Screwing up the first few times just happens. Happened to me quite a bit during the process.

  7. Thanks, Auria! The new theme is very likeable indeed, and keeps around the same color palette as the old site, with a little blood dashed in. And of course the design is way better.

    The theme design kudos go to solostream.com.

  8. thanks a lot for this great tip! i have finally moved SEO concepts from blogger to wordpress, it worked perfectly from my vertito.blogspot.com blogger account

    nice ! keep it up!

Comments are closed.