Exclude a subdomain from a dns wildcard record

domain-name-systemsubdomainwildcards

I have a domain name set with wildcard for all subdomain (*.mydomain.com), I need of exclude a specific subdomain from this condition, I use a record dns for set wildcard and if I set a new record A for a specific subdomain it not work

Best Answer

Normally when you define a wildcard record, it will only match if no other record matches. So if you have

example.com.        A 8.9.10.11
*.example.com.      A 4.5.6.7
host1.example.com.  A 1.2.3.4

A wild card will only be matched if there is no subdomain defined. If you ask host1.example.com. it should return 1.2.3.4 and not 4.5.6.7

If this is the case, it might be that the changes haven't propagated yet. Use the dig to query your DNS server and some public server (google's is 8.8.8.8).

Related Topic