Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2/Route53: How Do I Point Apex Record at Load Balancer?

In Amazon, I am attempting to create a cname for a domain,

example.com 

to a load balancer in Route 53

Examplecom-1058462749.us-west-2.elb.amazonaws.com

But when I try to save the record, I get this error:

RRSet of type CNAME with DNS name example.com. 
is not permitted at apex in zone example.com.

And when I try to make it an A record, I get a similar issue:

The record set could not be saved because:
- The Value field contains invalid characters 
or is in an invalid format.    

Because the public DNS of the load balancer is not an ipv4 address. What am I doing wrong? How can i get example.com to point to the load balancer? Note, I did successfully created a cname for www.example.com to the load balancers public dns.

like image 560
David Williams Avatar asked Nov 22 '13 03:11

David Williams


People also ask

How do I point a record to AWS load balancer?

Sign in to the AWS Management Console and open the Route 53 console at https://console.aws.amazon.com/route53/ . In the navigation pane, choose Hosted zones. Choose the name of the hosted zone that has the domain name that you want to use to route traffic to your load balancer. Choose Create record.

Does Route 53 support zone apex records?

Yes. Amazon Route 53 offers a special type of record called an 'Alias' record that lets you map your zone apex (example.com) DNS name to your Amazon CloudFront distribution (for example, d123.cloudfront.net).

How should the customer configure the DNS zone apex record to point to the load balancer?

How should the customer configure the DNS zone apex record to point to the load balancer? Create a CNAME record pointing to the load balancer DNS name. Create a CNAME record aliased to the load balancer DNS name.


1 Answers

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingAliasRRSets.html

You don't use a CNAME, you use an A record configured as an ALIAS for the ELB.

When you set Alias to "Yes" while creating the A record, you will then see a box where you select the ELB whose internal info will be used to serve up answers for the alias.

Aliases are a Route 53 feature designed to support exactly what you are trying to do.

like image 146
Michael - sqlbot Avatar answered Sep 28 '22 07:09

Michael - sqlbot