Cheap as hell hosting. How to set up a website with as much data as you want and email for virtually nothing.
Overview
Sign up with Google Apps Standard Edition and buy a domain through them. Get two types of really cheap pay as you go hosting. Split the hosting up into html files and bandwidth intensive files (images, movies et cetera) and put them in two separate places. Then change your CNAME records on the domain you’ve bought to point to these two hosting services.
Details
Google Apps is awesome. You essentially get all the same stuff you get with a normal Google account like Gmail, Google Calendar, Google Docs but at your domain. For example your email address could be you@yourdomain.com and you’d login to it through mail.yourdomain.com. It’s free for individuals and you can register a domain with Google Apps Standard Edition here. They’ll set it all up for you automagically.
Amazon S3 is complicated as hell. It’s basically a back end storage service for online apps. But it’s very cheap (pricing here) and storage space and bandwidth is unlimited. This is where you put anything that might be heavy on bandwidth.
S3HUB is a free Mac app that can connect to Amazon S3 and upload files. I hear Transmit can also do it and I’m sure there’s heaps of others for both Mac and PC.
NearlyFreeSpeech.NET is a pay as you go hosting service where you can pre-pay as little as a couple of dollars. It seems to support all the fancy server stuff that all the other guys do. Plus it has support for multiple domains and, again, is cheap as hell. Just not quite as cheap as Amazon. Disk Space (Storage) is $0.01 per megabyte per month and Data Transfers (Bandwidth) starts at $1.00 per gigabyte and goes down. So if you just put all the small .html files here then I can’t see how it will ever cost more than a couple of dollars.
If you don’t have large files it may be easier to just put everything at NearlyFreeSpeech and not use Amazon S3 at all. But if you get a bit of traffic it will cost a little bit more.
What now?
So you’ve got a domain through Google Apps and signed up for Amazon S3 and NearlyFreeSpeech. Now you need to point your domain to Amazon S3 and NearlyFreeSpeech. Through the Google Apps admin page you can go to advanced domain settings. This will take you to godaddy.com (the company Google uses for domain registration). Once you’re in you need to change a couple of CNAME records.
Click on your domain then click on Total DNS Control and MX Records. Under CNAMES click add a new CNAME record then make the alias ‘files’ and the points to host name ‘s3.amazonaws.com’ (without the quotes).
You’ll also need to change the www CNAME record to link to NearlyFreeSpeech, but that’s dependent on your domain so you’ll need to get that info from within your NearlyFreeSpeech account.
CNAME records can take up to 48 hours to update, so if it isn’t working, that might be why. Although these days it seems to happen within a few minutes.
Open up S3HUB and log in. Make a folder (bucket) called ‘files.youdomain.com‘ (without the quotes). Once you’ve done that if you put image.jpg in the files.yourdomain.com bucket it will be at http://files.yourdomain.com/image.jpg. Keep in mind, when uploading files to Amazon S3 that you need to change the permissions on the file to read only for all users. You can do this by selecting the file(s) in S3HUB, right clicking, going to More > Permissions.
You then just need to upload your .html files to NearlyFreeSpeech via FTP. Cyberduck is a free FTP client for Mac and you can get the FTP login details in your NearlyFreeSpeech account.
Done.