Monday, August 08, 2011

Moving Blogs to New Domain

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

Why did I use 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 nor is available so I picked 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

I let point to for several months and it works well, but the content stays on Now I want to move the content to and make 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