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.

Last Updated:
Filed Under: Web

This post may include affiliate links. Read more.

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.

David Coleman / Photographer
by David Coleman

I'm a professional freelance travel photographer based in Washington DC. Seven continents, up mountains, underwater, and a bunch of places in between. My images have appeared in numerous publications, and you can check out some of my travel photography here. More »

Leave a Comment