Route53 Error: RRSet of type CNAME with DNS name is not permitted at apex in zone
RRSet of type CNAME with DNS name is not permitted at apex in zone
This error normally happens on trying to add CNAME for main domain to route the traffic to loadbalancer. But the zone must have NS and SOA records by-default. So its not possible to configure CNAME with the same name.
As per RFC1912 section 2.4:
A CNAME record is not allowed to coexist with any other data. In
other words, if suzy.podunk.xx is an alias for sue.podunk.xx, you
can't also have an MX record for suzy.podunk.edu, or an A record, or
even a TXT record. Especially do not try to combine CNAMEs and NS
records like this!:
podunk.xx. IN NS ns1
IN NS ns2
IN CNAME mary
mary IN A
The nameserver wouldn't know whether it needs to follow the CNAME or answer with the SOA record. So zone file don't have both a SOA record and a CNAME with the same name.
Route 53 provides the option to create alias records to resolve this problem. We can create A record alias to forward the traffic to loadbalancer.
That's all…