Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Wildcard DNS record
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Definitions of DNS wildcards== A wildcard DNS record in a [[zone file]] looks similar to this example: {{sxhl|2=zone|1= *.example.com. 3600 IN MX 10 host1.example.com. }} This wildcard DNS record will cause DNS lookups on domain names ending in <code>example.com</code> that do not exist to have MX records synthesized for them. So, a lookup for the MX record for <code>somerandomname.example.com</code> would return an MX record pointing to <code>host1.example.com</code>. Wildcards in the DNS are much more limited than other [[wildcard character]]s used in other computer systems. Wildcard DNS records have a single '''<code>*</code>''' (asterisk) as the leftmost [[DNS label]], such as <code>*.example.com</code>. Asterisks at other places in the domain will not work as a wildcard, so neither <code>*abc.example.com</code> nor <code>abc.*.example.com</code> work as wildcard DNS records. Moreover, the wildcard is matched only when a domain does not exist, not just when there are no matching records of the type that has been queried for. Even the definition of "does not exist" as defined in the search algorithm of {{IETF RFC|1034}} section 4.3.3 can result in the wildcard not matching cases that one might expect with other types of wildcards. The original definition of how a DNS wildcard behaves is specified in {{IETF RFC|1034}} sections 4.3.2 and 4.3.3, but only indirectly by certain steps in a search algorithm and as a result, the rules are neither intuitive nor clearly specified. As a result, 20 years later, {{IETF RFC|4592}}, "The Role of Wildcards in the Domain Name System" was written to help clarify the rules. To quote {{IETF 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 <code>*.example.com</code>, and an A record (but no MX record) for <code>www.example.com</code>, the correct response (as per {{IETF RFC|1034}}) to an MX request for <code>www.example.com</code> is "no error, but no data"; this is in contrast to the possibly expected response of the MX record attached to <code>*.example.com</code>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)