Mapping multiple Route53 record sets to a record set

29 / Jan / 2014 by Hitesh Bhatia 0 comments

Lets take an example where we need to point, to using AWS’ Route53.

Creating a record set to point to is easy, where would be a CNAME type record with value “”. But mapping to is not that trivial as R53 does not allow creation of a CNAME record at the top node of a DNS namespace (aka the zone apex). Which basically means that we cannot create a CNAME record for zone apex

The answer to this might be creating an A type record which points to same IP address as This might not be an issue when you have a couple of hosted zones with very minimal record sets. But for bigger projects there can be many hosted zones with multiple record sets where maintenance of these records would become an issue.

A better and more manageable way to do this would be via S3 bucket. Below are the steps to do same.

1. Create an S3 bucket with name “”.
2. Redirect all requests to another host name ( for this bucket.

In this step we are asking AWS to do a permanent redirect on all incoming requests for bucket named “” to “”.

3. Point to

We have already redirected all requests for to in step 2. And now we create a CNAME type record that would permanently redirect all requests that are targeted to to

4. Create an ALIAS type record for that points to bucket created in step 1.

Finally we tell AWS to send all incoming requests on to bucket named which would redirect all requests to and which would ultimately send all requests to

These steps basically allowed us to bypass the limitation where creation of CNAME type record is not allowed for the zone apex. The whole architecture is described in following image.


Leave a Reply

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