Why does the wildcard not work?
my bind config
carrie IN A 192.253.253.4
*.carrie IN A 192.253.253.6
*.test.carrie IN A 192.253.253.7
execute
nslookup carrie
Address: 192.253.253.4
nslookup a.test.carrie
Address: 192.253.253.7
but when I execute nslookup test.carrie
*** Can't find test.carrie: No answer
Solution 1:
The wildcard is working fine, which is why a.test.carrie
resolves. Your issue is that test.carrie
doesn't resolve.
The reason is simply that you haven't got a record for test.carrie
.
*.test.carrie
matches immediate subdomains of test.carrie
, but matches neither test.carrie
itself, nor any subdomains of subdomains of test.carrie
.
Add another record without the wildcard.