TXT record breaks wildcard CNAME

Let’s say I have the following records for my domain example.com:

*      CNAME    example.net
foo    TXT      "Bar"

A query to sub.example.com returns example.net. But a query to foo.example.com returns nothing. Is this expected behavior? Does the presence of a TXT record override the wildcard?

It is the expected behaviour according to RFC 1912

.https://en.wikipedia.org/wiki/Wildcard_DNS_record#Definitions_of_DNS_wildcards

To quote RFC 1912, “A common mistake is thinking that a wildcard MX for a zone will apply to all hosts in the zone. A wildcard MX will apply only to names in the zone which aren’t listed in the DNS at all.” That is, if there is a wildcard MX for *.example.com , and an A record (but no MX record) for www.example.com , the correct response (as per RFC 1034) to an MX request for www.example.com is “no error, but no data”; this is in contrast to the possibly expected response of the MX record attached to *.example.com .

2 Likes

Thank you! I will explicitly create a CNAME that subdomain instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.