How does one point a domain to a load balancer that doesn’t have a stable IP

amazon ec2amazon-web-servicesbinddomain-name-systemload balancing

I'm trying to point mydomain.eu 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 mydomain.eu where the A record and the www subdomain both point to, let's say, loadbalancer.mydomain.aws.com?

Best Answer

You can use an Alias record like described in http://aws.amazon.com/route53/faqs/:

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 (mydomain.com) to another ‘target’ DNS name (elb1234.elb.amazonaws.com). 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 domain.com to www.domain.com using a CNAME(after you've pointed it using the Alias record), like:

www.domain.com CNAME TO domain.com

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.

Related Topic