Posts Tagged ‘S3’

Mapping Amazon AWS S3 to a Custom Domain Name

November 7th, 2010 2 comments

According to Amazon’s Developer Guide you can setup Virtual Hosting of your files by adding a CNAME in your DNS server. I’ve sinced mapped a subdomain to Amazon’s S3 cloud.

The way I did this was to create a CNAME entry on my DNS server mapping to
and yes, that is a period at the end of Now just creating the CNAME entry only redirects users to Amazon S3, Amazon needs to know which bucket to use. The name of the bucket needs to be the fully qualified domain name (FQN) that you are using. So in my example, my bucket name is

In general, if you want to create then your bucket will have to be named I was under the impression that I could create and name the bucket whatever I wanted with a

According to Amazon Web Services

Customizing Amazon S3 URLs with CNAMEs

Depending on your needs, you might not want “” to appear on your web site or service. For example, if you host your web site’s images on Amazon S3, you might prefer as opposed to

The bucket name must be the same as the CNAME. So would be the same as if a CNAME were created to map to

Any bucket with a DNS compatible name may be referenced as follows: http://[BucketName][Filename], for example, Using CNAME you can map to an Amazon S3 host name so the previous URL could become:

The CNAME DNS record should alias your domain name to the appropriate virtual hosted style host name. For example, if your bucket name (and domain name) is, the CNAME record should alias to

**Edit 13 Dec 2011 – Updated AWS developer guide link

Categories: Amazon S3 Tags: , , ,