Have a look at RFC 1912
(section 2.7), it's just a short paragraph so don't be lazy and go read it.
Here's the additional info from me (not covered in RFC):
Most admins use wildcard only on MX but wildcard slows things down so don't use it if at all possible. Just use explicit
record, don't use wildcard.
: I have a lot of subdomains and I run BIND, therefore I want to use wildcard on A record to point all of them to my IP 188.8.131.52.
: That's BIND ugly and inefficient zone format problem. When you have over 1000 A records in a BIND zone, it's very inefficient (not in tinydns because it's a thousand time faster). But using a wildcard on A just make your life easier on administering your zone, it actually is slower
than defining one by one explicitly. If you are that type of lazy admin, your boss will likely fire you shortly, if you don't fire yourself.
: I don't have that many subdomains, but I do need to rely on the subdomain part for my dynamic site so people requesting foo.domain.com internal redirects to www.domain.com/index.php?foo
: That's your design flaw, you shouldn't rely on foo
.domain.com in the first place.
: Because your implementation is wasting your server resources when you can simply use: www.domain.com/foo
Note, when you make a query and its DNS turns out to be a wildcard, you don't cache
, you cache each answer individually.