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

落爺英雄遲暮 提交于 2019-11-30 02:18:45

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/20136293/ec2-route53-how-do-i-point-apex-record-at-load-balancer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!