Nov 18

First off you will have to have an AWS account and create an S3 bucket to use for your website.

  1. Create an s3 bucket using your domain name as the bucket name (your bucket name should be if you want your site to be or
  2. Upload your content to the s3 bucket. Choose a consistent name for your website index files (index.html usually). You can also upload a custom page for 404 Not Found errors. Call this 404.html. Give Read permissions to every file in your website so that the public can view it. Don’t give any extra permissions to the bucket, just the files within.
  3. Configure your bucket as a website. With the AWS console ( you can select your bucket, click properties, then select the “Website” tab. Click enabled and set your index document to “index.html” and your error document to “404.html”. You will also need to set your bucket with access permissions to allow access via the web (
  4. Take a note of the “Endpoint” URL in the website configuration tab. This is where your website lives. You can open the link in a new window and you should see your website just as it will look. Click around and make sure everything works as expected.

You MUST use the endpoint address in all steps below. The normal won’t work – you need to use the regional version (

Now, we can set up the DNS to give you a clean, custom URL.

First, we will map to your site.

Using your DNS provider’s tools, you need to create a CNAME record to map to

The CNAME is the only thing you need if you just want Most people also want “” to work so we need another step.

The “” is often referred to as a naked domain or the apex record of the domain. The reason it’s a problem is that it can’t be a CNAME. CNAMEs only work on subdomains like “www.” This makes it more difficult to point at s3.

The usual approach is to use a service to automatically redirect any request going to to point to This will then pick up your CNAME record and your site will be served from s3.

The automatic redirect is not possible with plain old DNS so you have to use another service. Some DNS providers offer this service along with their DNS (godaddy does, amazon route53 does not)

If your DNS provider doesn’t do it, there are a few free services. One that I’ve used is – it doesn’t require any registration or payment.

To use this type of service, you need to create a DNS “A” record for your naked domain. The service requires you to create an A record and point your naked domain (“”) to That’s all they do the redirect to your CNAME!

So, with this setup, if a user types into their browser, the following would happen:

  1. DNS query: -> (’s service)
  2. HTTP request to for
  3. redirects ->
  4. DNS query: -> CNAME to
  5. DNS query: -> points to Amazon S3
  6. HTTP request for is now served by Amazon S3


Leave a Reply

preload preload preload