Amazon S3 Offers Complete Website Hosting

18.02.2011

Secondly, it's impossible to host a root domain at S3 because S3 can only be accessed via in DNS records (S3 has no static endpoint IP address, so it can't be configured for the ). In other words, hosting www.example.com is possible, but not example.com. A separate hosting service configured for the DNS A-record would need to direct visitors arriving at example.com to www.example.com. (Incidentally, many experts consider adding www as a CNAME record to be bad practice, although it works fine.)

Setting up complete Website hosting with S3 is easy. Start by visiting and creating a new bucket in your AWS, named after the Web address that will direct there. For example, should I wish visitors to to be redirected to a bucket, I'd name it .

Then upload all your Website's files using the Upload button on the S3 console, or via , if you use one. Don't forget to set all the files as publicly accessible, which you can do from the Upload window.

Next, right-click the new bucket, listed on the left of the console, and select Properties. In the new panel at the bottom of the window, click the Website tab and ensure Enabled is checked, before typing the filename of your index and error documents. Note that it's not possible to specify specific 4xx documents, such as 404, 403, and so on; all errors will have to be directed to the same error page. Click the Save button when done.

Make a note of the address listed alongside Endpoint, which is beneath the index and error document filenames in the same panel. Now head over to your domain registrar's configuration panel and configure a new CNAME record for www, specifying the S3 endpoint address (remove the http:// prefix from the endpoint address and any trailing slashes at the end).