Matthew Moore - Articles - 05/01/2011
Host for pennies with a fast reliable service using your own domain name linked to Amazon S3 (Simple Storage Service) with CNAME DNS (you don't need to know what this means, I barely do, but it's the proper way to do it and is superior to standard webforwarding)


It's very cheap and you only pay for what you use. No need for a per month contract like with a normal webhost. 1GB of space with 1GB of trafffic per month costs 14p. You can calculate your costs here. Personal domain names ie www.mydomain.co.uk cost from £2.99 a year. (not provided by Amazon)
It's fast - very good for serving videos quickly. It's the infastructure that amazon.com uses so it can't be bad.
You can give the website 'bucket' (basically a folder) any name and that will be start of the address.
You can have as many of these buckets as you wish
Static html sites only - no dynamically generated sites using php etc.
By default the address will have a lot of extra stuff after the website bucket name - it will be something like http://my-chosen-bucket-name.s3-website-us-east-1.amazonaws.com/ though it's possible to configure things so that www.my-domain-name.com is the address of your site.
Amazon S3 isn't setup to host domain names and link them up to your webspace automatically. It takes a little configuring to get it functioning with your own domain name held by a different provider though it's actually pretty simple once you have the right information. It's well worth it... once it's setup it's just as easy to maintain, upload files and set up new sites as a normal service - probably easier. I found it very hard to come across the correct way to do it and took some trial and error which is why I have written this guide.
If you are using a different domain host the configuration options might be bit different so I can't guarantee it will work. Also some domain hosts aren't set up very well to do this kind of thing. I was using 1and1 originally and it wasn't possible. If you are having trouble with your host then consider transfering domains to a highly configurable and reputable host like Gandi.
Note you do not need to pay for a web host service at a set price per month which gives you space online for your website - only domain registration is needed. Amazon S3 will be your web host. The reason that it is so good value (I think) is that it it's aimed at bigger business and doesn't need to be making a big profit from normal home users and doesn't offer an all inclusive web host service it has to maintain where addresses and domains are integrated. Basically like it's name suggests it's just a simple storage service - just that it can be configured to work as a website and with a normal domain if need be.
The guide is correct as of January 2012. Website sections and settings can change.
If you don't already own a domain name and intend to have a website at an address such as www.my-domain-name.com then I recommmend using Gandi to register it. There are other places to register domain only packages and they should offer a basic service included in the yearly price including email (from about £2.99 depending on if its co.uk/.com etc)
It is important to know you do not need a web host. Ie you do not need to pay for a service at a set price per month
If you are happy with an address such as http://www.my-domain-name.com.s3-website-eu-west-1.amazonaws.com then you don't need to buy your own domain name. The name of your Amazon S3 'bucket' will be the start of the address - so you just call the bucket www.my-domain-name.com or whatever you please...it could be http://any-random-nonsense.s3-website-eu-west-1.amazonaws.com.
If you already own a domain name but it is linked to a web hosting package that you won't need anymore after transfering your site to Amazon S3 you can attempt to end your web hosting package but keep the domains only and configure those to point to Amazon. I recommend setting up the new site first on Amazon S3 then see if you can link the existing domain names within your normal package. (So that you still have your old webspace functioning to fallback on.) If it works you can then attempt to end the web hosting account but keep the domains.
It is possible depending on your web host that they might not be set up well for configuring things to point to different servers and such. If you would rather cancel your current contract completely and start with domain hosting only with a very good service that definitely works then transfer your domains to Gandi then close your account completely. Again it's probably best to set up the S3 site first so you are transfering over to something which is ready. Make sure during the transfer you set it to use Gandi DNS. If the transfer fails at first it's probably because you have to push the domain away from your host and towards Gandi. Your domain host should provide details on this and you need to use the provider tag GANDI.
Ill return later on in the guide to configuring the domain to work with the Amazon S3 based site.
Go to http://aws.amazon.com and hit sign up in the top right hand corner. If you already have an Amazon shopping account you can set it up with that. Enter all of your details and follow the normal setup procedure.
If you aren't already in your Amazon S3 space go aws.amazon.com/console and sign in through pressing the button top right. Select S3 in the navigation tab. This shows an area where you can create and delete 'buckets' and manage files. We don't need to do anything here for now.
You can use the default Amazon S3 interface but there are various programs designed to access, upload, manage files and create buckets that are better and are accessable from your desktop. S3fox which works with Mozilla Firefox seems popular but I use a program called Cloudberry which is very easy to use, has good reviews, is free and you don't need Firefox for it to work. If you fancy that then download it here - install and carry on following the Cloudberry instructions in the next few steps, otherwise use your own chosen program to do the same thing.
In Cloudberry on either the left or right hand side select <New Amazon S3 Account> in the 'source' options at the top. To get the access details click your name at the top right of the Amazon S3 webpage and select security credentials.
Use the Access Key ID and Secret Access Key (clicking show) on this page. Display name is the full name at the top of the personal information page linked on the left of the security credentials page. You can leave use ssl and govcloud account unticked and click ok. Now the account should be linked up correctly. Now you can access the Amazon S3 account on one side of Cloudberry and display files from your computer on the other and transfer between or transfer between folders on Amazon S3 by having Amazon S3 both sides. (you can't copy and paste or rename buckets, so to change the name of a bucket make a new one and transfer the files).
Think of a bucket as a route folder. You can have as many as you want and store anything in them. Setting it to be a website is just an option.
This can be done in the default Amazon S3 space simply but here are the instructions using Cloudberry.
Select the little blue 'New bucket' icon at the top of the window you have your Amazon S3 space open in.
It's very important you give the name of the bucket as www.your-domain-name.com (or co.uk etc) If you don't have a domain name yet I advise to set one up with Gandi. If you don't need your own domain name without the Amazon address showing then call it anything aslong as you follow the bucket naming conventions. It's worth checking out the conventions anyway to make sure your domain name is ok and it's good for use with DNS (the way that you link to the Amazon S3 webspace) like it can't contain underscores. www.my_website.com wouldn't be recommended.
I don't think it matters too much but set the location which is closest to you or your general users.
Right click the bucket and select properties. Under the website tab check 'turn on website'. Set index document to 'index.html'. (Call the front page of your website index.html). Error document isn't required though you can fill this in if you want and have a 404.html error page for your website. I haven't got one.
Under the security tab click public(everyone) and make sure to check 'apply for all subfolders and files'
It's best to have your website on your computer in a folder with the same name as the Amazon S3 bucket. ie www.your-domain-name.com.
Navigate to the website folder on your computer on either the left or right window of Cloudberry and your Amazon S3 website bucket on the other side.
Click 'Copy' at the top of the window with your own computer based files. It will upload the files to the Amazon S3 website bucket. Don't click 'Move' as it will remove it from the original folder.
I haven't found a way to find this in Cloudberry so go to your Amazon S3 space through Amazon itself. Right click the bucket and select properties. The address under endpoint of the website tab is the address of your website. It's online!
If there is any problem make sure the bucket is set to be a website and permissions are added for grantee 'everyone'. (this would have been configured through Cloudberry when you set the bucket to be public and on Amazon S3 should just just have 'list' ticked) If you have any problems accessing files it is likely that the permissions haven't been granted for 'everyone' (just 'open/download' needed) on that file though all of the files should inherit from the bucket if you set the public setting to 'apply for all subfolders and files' in Cloudberry. Not sure where you set this in Amazon.
You should already have a functioning website. Follow this step to get it working with a domain name like www.my-domain-name.com (without all of the amazon information after it)
I have already given details about domain only hosting (so you don't need to pay monthly fees for web hosting that you are now hosting on Amazon S3) - see step 1. This configuration works with Gandi domain hosting - I can't guarantee it's all the same with other domain hosts but as long as long as it has the configuration flexibilty it should be something similar to this.
So at this point I assume you have an active domain at Gandi (or another provider).
Please note that pointing to a particular address can be achieved through 'web forwarding' which is very simple but that isn't the best way to do it - it's not the real deal and you'll still see the amazon address once you have navigated to your site or if you set it so you don't see the amazon address your site won't show up in search engines. As I understand changing the CNAME is saying that the domain's webspace is the Amazon S3 space (or wherever you link to) where as web forwarding is just saying go to the the Amazon S3 domain (or wherever) after going to www.your-domain-name.com.
1: In your account under domains select the domain you need to configure to access it's full configuration page. Name servers should be set to Gandi addresses - if they aren't already you can set to use Gandi nameservers in the 'modify servers' section.
2: Click 'manage your zone file' in the name servers section. Unless there is already an entry of this type add a new entry name: www and type: CNAME. (if there already is one with these attributes edit it instead of making a new entry)
3: Leave 'TTL' at 3 hours. Delete the information in the value box. (you may want to save it somewhere just in case you need to revert it back) Use the address of the Amazon S3 website bucket in the value box adding a . to the end and removing the / if there is one.
It will be something like...
www.your-domain-name.com.s3-website-eu-west-1.amazonaws.com.
www.your-domain-name.com.s3-website-us-east-1.amazonaws.com.
Points to note:
You need to have the . on the end of com.
www.your-domain-name.com must be the name of your amazon bucket
you don't need to put http:// at the start of the value
you need the www in the value address even though entry is under name www already.
4: Hit submit, and submit again if prompted on a following page. Now wait a few hours for things to be configured and www.your-domain-name.com to work.
This means if somebody types in just your-domain-name.com instead of www.your-domain-name.com it will go to the right place.
Go back to the general area of the domain configuration. Select web forwarding manage.
Add a forwarding address. Type of forwarding - Direct (permanent). Leave 'subdomain' empty. Set forwarding address to 'http://' and put in your address www.your-domain-name.com.
If it doesn't work with your domain provider and you just can't work it out then this method with Gandi works for sure, that's all I can promise - this site is on Amazon S3 (unless I made any errors typing this up in which case let me know). Although it might be a hassle transferring your domains it should be pretty simple and automated and it might be the easiest option, it was for me. Remember that if the domain transfer fails you need to instruct your current host to transfer it toward the new host first. Gandi's provider tag is GANDI.
Here are the instructions to transfer domains away from 1and1 http://faq.1and1.co.uk/domains/domain_xfers/xfer_of_reg/10.html