Don’t Break Your Blog

I recently moved my blog from blogger.com to GoDaddy with BlogEngine.NET as my blog engine and so far everything has been pretty smooth once I figured out how to move all my old posts from blogger into BlogEngine.NET. Once I got a basic template up and most of the data over I considered it “good enough” but it’s always bothered me that I have duplicate data hanging around out there so today I rolled up my sleeves.

I really hate broken links so didn’t want to pull my old blog entirely incase anyone was linked to it but I did want them redirected to the new hotness and so after some searching I came across a great link, How To Redirect Blogger Beta To WordPress.com, and that got me about 90% of the way there. I only ran into a few issues.

The first issue was that his script assumes a WordPress permalink format (obviously, based on the post) so I had to adjust the regex to BlogEngine.NET style. After some tweaking and having to once again remember regex I got that working which led me into my next issue.

The second problem was that blogger doesn’t use the entire post title for the slug, it stops at a certain character limit whereas BlogEngine.NET uses the full Monty. I didn’t have a magic fix for this so instead I fired up Google Analytics, looked at my top 10 posts and manually adjusted the slug in BlogEngine to match what was coming through blogger and now the redirects come over like butta.

Another minor issue was that the auto-generated sitemap has a lastmod date of 0001-01-01, which really pisses web crawlers off. At first I thought it was just a few posts and was manually updating them but then realized it was pretty much everything. I’ll probably spin through the posts and set the last modified to the post date but I was a little disappointed that BlogEngine.NET didn’t have this logic already built in.

All in all I’ve been very happy with BlogEngine.NET and I like knowing I can start mucking up the code if I feel really creative. For another perspective on switching check out Steve Trefethen’s thoughts on BlogEngine.NET.