I'm considering changing the DNS www
records of a domain name from an A record to a CNAME. Various questions and answers on
serverfault are not as clear cut as I'd hoped. Also, many DNS checking tools like DNSsy
or intoDNS have as a check the fact that the www record is not a CNAME, is an A record,
pointing to a public IP address.
In my case, I
want to point my domain's www record to an Amazon Web Services load balancer which I can
only do with a CNAME. What would be the best way to achieve that?
Answer
If you are concerned about this issue, you can use Route 53 and ELB together to
get what you want. Create the www
record as an A record, then
select the "Alias" option and the interface will allow you to select an AWS-specific
target to point the record to. So the ELB has to exist first, then you can create the
Alias to it.
So you start to create a new A
record in Route 53 as usual, but you click on the "Alias" option right under the host
name. The freeform text block will disappear and you will be given the ability to select
your ELB under "Alias Target". Select your ELB and save the change. You will then have
an A record that points to www, which will be your
ELB.
(The above info about
the Route 53 UI has been corrected from the original
error.)
This is a special Route 53
feature most often used to handle serving from the domain apex, where A records are
required. But it can also be used for subdomains such as www
.
Basically, it's an A record that acts like a CNAME within the confines of AWS. Using
this feature, DNS tools will find an A record.
Comments
Post a Comment