Open fogyismstar opened 3 weeks ago
Thanks for asking. DNS protocol does not allow having CNAME at the zone's apex. This is since CNAME record cannot exists with any other record type for the same domain name whereas your zone's apex already has SOA and NS records.
If you get a DNS server to add CNAME at zone's apex and when a client caches this CNAME record, all of the records at your zone's apex like SOA, NS, MX, TXT which are commonly present, will fail to resolve.
It's possible that the intent of this request was to see behavior similar to Cloudflare's CNAME flattening on the apex:
https://developers.cloudflare.com/dns/cname-flattening/
Other providers offer similar functionality (ie: AWS Route53's ALIAS type records), where the DNS server looks up the CNAME and returns an A record as the answer. It would be a nice option to have, not just for the apex record but for other records (on a one-off basis or globally as an option) as there are potential performance gains. CF mentions that flattening can reduce the number of client lookups on names with many levels of CNAME (would need to disable it on individual records where CNAME response is expected).
Ya, could be that OP was looking for such function. In that case, there is ANAME record available that does CNAME Flattening.
Heh - I should read the docs. Didn’t realize ANAME had already been implemented. 😂
Cannot add CNAME record with name @