19

Generally wondering whether its possible to have both a CNAME entry with a " * " to domain and a seperate subdomain mapping i.e. like

*              | CNAME | domain.com
bla.domain.com | CNAME | some.example.com

Is this possible or does the * overwrite the "bla.domain.com" and therefore when you enter "bla.domain.com" you go to "domain.com" ?

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259

2 Answers2

19

In BIND, the wildcard matches when another record does not exist. See http://en.wikipedia.org/wiki/Wildcard_DNS_record.

Warner
  • 23,756
  • 2
  • 59
  • 69
14

A more specific entry always overrides a wildcard, not the other way around.

For chapter and verse, see ยง4.3.3 of RFC 1034.

Alnitak
  • 21,191
  • 3
  • 52
  • 82
  • 1
    From the very last paragraph of section 4.3.3: "For example, if a wildcard RR has an owner name of \*.X, and the zone also contains RRs attached to B.X, the wildcards would apply to queries for name Z.X (presuming there is no explicit information for Z.X), but not to B.X, A.B.X, or X." โ€“ KajMagnus Jun 27 '12 at 05:19