How to Set a CNAME for an Amazon S3 Bucket

Setting a CNAME to an Amazon S3 Bucket is easy to do, but there are some things to watch out for.
This post may include affiliate links.
Click here for more information.

If you want to use Amazon S3 to share files publicly for your website or to allow downloads, etc, you might want a URL that’s prettier than the default that will be something like this:

I might, for instance, just want to be able to use the URL:

To do that, you can set a CNAME that points to your Amazon S3 bucket.

  1. First make sure that your bucket name is the same as your CNAME. For instance, if I want the CNAME to be, I’d set the bucket name to
  2. Then you need to log into wherever your DNS settings are being maintained (if you haven’t changed it, it’s probably your web host), and create a new CNAME record for that domain. For the example above, I’d then point that CNAME to:

In Cloudflare, for example, it would look like this:


Depending on the settings your DNS provider is using, it can sometimes take a little while (sometimes even a couple of hours) for the new link to work. Some DNS providers are much quicker than that.

Newsletter //
On This Page //

Sign up to Receive My Newsletter

Keep up to date with the latest. It’s free. I do not share or sell your information. 

Leave a Reply

Your email address will not be published. Required fields are marked *