Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am configuring a few domain names in Route53 and am looking for some advice on best practices for setting things up. Here is the scenario:

Let's say is my master corporate domain, and I also have and

Suppose I have two Amazon EC2 instances defined as a web and database server, with elastic IPs of and respectively, and I want to address them externally as:

Let's further suppose that the website for is hosted on one of the above instances, which means that I must set an A record for (right?) to the elastic IP of the web instance. So I create record sets in Route53 like:                A     A      A            CNAME

Now, both and are also hosted on that web01 instance above, so I create record sets for them like:                A            CNAME

and                A            CNAME

This all works just fine, but it is not as elegant as I was hoping for. I am wondering if there is some way to set up this type of configuration in which there are fewer records pointing to direct IP addresses.

My understanding is that I can't use a CNAME record for the root of a domain (right?), so is there some other way to set things so that I only have one "hard" reference to each IP in my DNS infrastructure?

If not, does this seem like a smart setup? Or a dumb one? Feel free to tell me I'm dumb. :)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

First things first, if you only have two instances (one web and one DB), you're doing it wrong. You should be setting up an elastic load balancer with a minimum of two application server instances behind it. Instances can (and do) fail from time-to-time. And you really should be using RDS for your persistent data store.

My understanding is that I can't use a CNAME record for the root of a domain (right?)

You can, but it will frequently break stuff (esp email) in unexpected ways and shouldn't be done. This how I would do things:                A     A      A            CNAME                A            CNAME                A            CNAME
share|improve this answer
Right, the web/db example was just for simplicity's sake, it isn't a real configuration. So it sounds like I am not too far off then on the DNS at least. – futureal Jul 26 '12 at 3:25
In your example you are pointing to IP's, yet you suggest using ELB's which do not provide you with an IP, how do you handle the root domain in these cases? – Kevin Jul 27 '12 at 0:04
Kevin, Route 53 has some additional features compared to traditional DNS hosting. One of them is the ability to create an "alias." So you create a normal A record for your root domain but rather than imputing an IP address, you choose "Alias: Yes" in the AWS Management Console and select your ELB. – jamieb Jul 27 '12 at 2:48

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.