Monday, August 08, 2011

Moving Blogs to New Domain

I bought catchen.me last year and point it to my old domain catchen.biz. Now I want to use catchen.me as my main entrance. That means I need to migrate all sub-domains under catchen.biz to catchen.me.

Why did I use catchen.biz at the first place? I wanted to register a domain from Google Apps in order to make sure that my domain is associated with Google Apps. Neither catchen.com nor catchen.net is available so I picked catchen.biz. However, I found out that people don't respond well to .biz domains. When I say "you can find me on catchen dot biz", they will ask "catchen dot what?" Then I understood that I needed to get a easily recognizable domain. That's why I bought catchen.me.

I let catchen.me point to catchen.biz for several months and it works well, but the content stays on catchen.biz. Now I want to move the content to catchen.me and make catchen.biz a simple redirection. I wanted to do this long ago but I'm too lazy to set up an Apache for the redirection. I don't want to touch all those configurations so I kept postponing this task.  Recently I found out that I can do this with pure JavaScript and that's a language I'm comfortable with, so I decided to give it a try.

I wrote a less than 30 lines JavaScript file and push it to Heroku. Then it's done. And it's free! I don't need to maintain my own server. Heroku's free plan should be enough to handle a few request to my old domain. I don't need to know anything about Apache configuration.  All I need to learn is Node.js, but I want to learn it for fun anyway.

So far, I've migrated three sub-domains: english, cantonese, and dotnet. If the solution is stable, I will move chinese, which is the sub-domain with most content.

No comments:

Post a Comment