Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to make a CNAME record for my Amazon S3 domain, to have nicer URLs.

There's not much discussion of this out there on the web, and nothing at all in the Amazon documentation (unless I'm missing it). Is this a reasonable thing to do? Are there any drawbacks?

share|improve this question
up vote 11 down vote accepted

AFAIK there is nothing special to it. In your public DNS just create "" as a CNAME to "" and have the folder name match your domain name.

CNAME record for my Amazon S3 domain, so have nicer URLs

I assume you have your website hosted elsewhere. Inside the HTML there are links to images, videos etc hosted on S3. You'd like these links to look nicer.

Is this a reasonable thing to do?

Well, for some. I don't think too many end users will look into your HTML or notice what their browser is loading -- and if they do, I don't think they care.

Are there any drawbacks?

One more single point of failure (your DNS config), but it's probably insignificant as you already have this same issue for your main website. A (quite) small slowdown for your users, as they have to make one additional DNS lookup now. First one for your CNAME (fx and then one for S3. That's maybe ~100 ms on average, not much.

A quick note: It seems you're already using S3. If it works well, then that's fine. If your audience is somewhat global, and you have fair traffic, then you could use a Content Delivery Network instead. Amazon's own Cloudfront of course comes to mind, but it's not the fastest CDN around. To get a feel for the speed of various CDNs you can use Cloud Harmony's test tools from a couple of locations. For small files (CSS, JS, images) pay special attention to latency. For video throughput is more important, but that's rarely a problem for a CDN.

share|improve this answer
I have a service that sends users to download files, so the URLs are a bit more visible than they would be if they were just for static assets in a webpage. Good point about the additional point of failure. I'll check out cloud harmony's test tools, thanks. – John Bachir Aug 21 '10 at 15:02
For larger file downloads I think S3 is perfect. CDNs are mostly good for a) many small files, such as websites or b) large amounts of users who download the same content, such as video or software downloads. If each of your files is just downloaded a few times, then a CDN won't improve anything over regular S3 alone. – Jesper Mortensen Aug 21 '10 at 20:25
I tried this but it doesn't work. It says there is no such bucket. The other approach below (…) works fine but this time s3 redirects the request to something like when you type (a bucket named must be created on S3). – Zafer May 6 '11 at 12:34

This should cover what you are wanting. Post your comments, etc for additional help:

share|improve this answer
I believe this post you referenced is out of date as the cname should point to and not as listed in the post – schmidty Mar 3 '11 at 22:38
Ok ... but as you can see, I gave this answer in August of last year... – drewrockshard Mar 4 '11 at 7:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.