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

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'm trying to point to an AWS load balancer, which, by its nature, does not have a stable IP, so I think I'm supposed to point the A record to a subdomain at Amazon, but as far as I can tell the A record can only be an IP address, so I'm terribly confused at the moment.

What would the zone file look like for where the A record and the www subdomain both point to, let's say,

share|improve this question
Can you clarify if you are using Route 53 as your DNS provider or your own external provider? – Brent Pabst Sep 4 '12 at 19:03
up vote 3 down vote accepted

You can use an Alias record like described in

Additionally, Route 53 offers ‘Alias’ records (a Route 53-specific virtual record). Alias records are used to map resource record sets in your hosted zone to Elastic Load Balancing instances. Alias records work like a CNAME record in that you can map one DNS name ( to another ‘target’ DNS name ( They differ from a CNAME record in that they are not visible to resolvers. Resolvers only see the A record and the resulting IP address of the target record.

Next you can cname the domain like to using a CNAME(after you've pointed it using the Alias record), like: CNAME TO

Also please note that in order to do this you'll need to move your zone to route53 so to do the Alias record. Most of the DNS providers unfortunately don't offer the ability to make such records for the domain name.

share|improve this answer
This is the approach I ended up going with and it works perfectly. Thanks! :) – Elver Loho Sep 5 '12 at 20:04
What do you mean by "cname the domain like to using a CNAME". Is this domain management or Route 53? – S-K' May 10 '13 at 12:10

From the AWS info page on Elastic Load Balancing:

Traffic to the DNS name provided by the Elastic Load Balancer is automatically distributed across your load balanced, healthy Amazon EC2 instances.

So in essence, Amazon provides you with a DNS name to map your records to. This would be using a CNAME record as opposed to an A record. The DNS name of the load balancer should not change therefore you never have to deal with IPs which as you point out might change.


AWS has always supported direct CNAME links to subdomains and wildcard subdomains for a root domain with simply CNAME records. So essentially it looks something like: ->

Then for your root level domain you have two options, either setup DNS forwarding with your DNS host provider so that -> or utilize Amazon's Route 53 service to host your entire DNS zone and let them manage and setup the required records to get root-level domain support.

If you don't need root domain level support and using a subdomain such as or then you can use simple CNAME records for everything.

share|improve this answer
If you are to use the zone name record, like you have zone, then a CNAME won't work and you will have to use and Alias record as stated in my answer in order to point to the ELB. – Logic Wreck Sep 4 '12 at 18:26
If you have a domainname that you need to point to the ELB, and it's similar to the zonename name, then you need to use an Alias record in order to point this domain to the ELB rather then a CNAME as a CNAME won't work in this case. – Logic Wreck Sep 4 '12 at 18:33
Actually he says the next: where the A record and the www subdomain both point to, let's say, - please check thus my update. if he'll want to point the domain itself he'll have to use the Alias record as stated. Also please note that most DNS providers don't allow CNAMEs for the domain name, only A records are allowed. – Logic Wreck Sep 4 '12 at 18:51
Well for instance godaddy doesn't and from what I've seen in my practice as a sysadmin a lot of people host their DNS zones there. – Logic Wreck Sep 4 '12 at 18:54
godaddy is hardly a gold standard… – MikeyB Sep 4 '12 at 19:08

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.