The blog was down for a few hours this afternoon. No-one knows about the site yet though, so it is hardly a problem. I got fed up with the limitations of the free hosting I had, and switched to a grown-up setup with some unanticipated difficulties. Originally, years ago, I made an account with Freehostia, who still seem to do the best free hosting, but resurrecting that account when setting up this site the other day was a false economy, which is what led to the problem: Paid hosting is always worth it.
In this case, I run several websites out of a shared hosting package with WebHostingBuzz.co.uk, which I highly recommend, so I did not have to pay any extra. The trouble was that I had some slightly complex DNS requirements. For hosting websites, there are a few maxims to always follow:
- Never let your host control your domain. Buy it from 123-reg or GoDaddy separately, and make sure you control it for life.
- Try to keep your DNS registar's nameservers as your main ones if you can. This is where I failed today. Cheap and grumpy outfits like Freehostia will not let you do this the right way, but find a resident CompSci and a decent host and this is the right way to do it.
- If someone asks you to set up their website, but it is your first hosting package and you do not own a domain yourself, do not use the other domain as the main one. Instead get yourself a lifelong .me domain as soon as you can, buy the hosting with that as your primary domain. All hosting will allow a parked domain, so this will not cost any extra if you do not plan to set up a site of your own. On the other hand, upgrading to reseller-style hosting (with multiple independent sites on one host) is much more cost-efficient when other societies, churches, and friends spot your élite skills and ask you to set up their site.
- Finally, for budding geeks, learn DNS thoroughly, and the guts of Apache URL rewriting too. I now have a pretty fiddly setup on the server to redirect all the hosted domains around and call right webapps. It is essential that hosts have all the right modules enabled though, which only good ones are able to do.