The records you will meet in nearly every zone
DNS Wildcard Records Explained: How They Match Subdomains
A wildcard DNS record uses an asterisk label to provide answers for names that do not have a more specific record in a zone. It can be useful when an application accepts many tenant subdomains or when a service intentionally handles a broad set of hostnames. A wildcard is not a universal rule that overrides every explicit record, and its behavior depends on DNS name existence and the requested record type. It can also create surprising results by making misspelled or unintended subdomains resolve somewhere instead of failing clearly. Use it only when the application and security model are designed for that breadth.
How wildcard matching works
A wildcard label is written as an asterisk at a particular name level, commonly *.example.com. It can supply data for certain names beneath that point when no closer matching data exists. It does not mean that every descendant at every depth is automatically created in the way a filesystem wildcard might suggest. Existing names, delegations, and empty non-terminal nodes affect the result. Record type also matters: a wildcard A record does not automatically create every possible MX, TXT, or AAAA record for every subdomain. Test the names and record types your application expects rather than assuming one wildcard covers all DNS behavior.
| Configuration choice | Likely effect |
|---|---|
| Explicit record for a name | Provides that name's configured data |
| Wildcard at a parent | Can answer eligible otherwise-unconfigured names |
| Wildcard A only | Does not imply wildcard email or TXT policy |
| No matching record | May return no data or a name error depending on zone state |
A common use case is multi-tenant hosting where each customer receives a subdomain and all such names route to the same application edge. The application then inspects the hostname and determines which tenant or site to serve. DNS only gets the request to an endpoint; it does not validate that the requested tenant exists or that the requester may access it. The application must enforce its own routing and authorization rules. If unknown subdomains fall through to a default site, ensure that default does not expose administrative tools, debug content, or another customer's data.
Operational and security considerations
Wildcards can hide typos during testing because a misspelled name may still resolve. They may also cause certificate automation to request names you did not intend to publish. Email-related wildcards need special care: a wildcard address record should not be mistaken for a deliberate mail policy, and catch-all mail behavior belongs to the mail system rather than being created by DNS alone. Inventory explicit names and delegated subdomains before introducing a wildcard. Document who owns the behavior and what the receiving application does with unexpected hostnames.
- Use wildcard records only for names your application is prepared to handle.
- Keep explicit records for services that need distinct routing or policy.
- Test unknown and malformed subdomains, not only expected tenant names.
- Do not treat wildcard DNS as access control or tenant authorization.
- Review certificate, email, and monitoring implications before deployment.
Troubleshooting a wildcard answer
When an unexpected subdomain resolves, inspect the zone for a wildcard at the relevant level and check whether a more specific record or delegation exists. Query the exact name and record type, then compare it with the wildcard target. If a wildcard seems not to apply, examine whether an existing node changes wildcard synthesis for that branch of the DNS tree. Provider interfaces can abstract these details, so confirm how the service implements wildcard records. After removing or changing a wildcard, allow for caches to expire and test both previously expected names and names that should now fail.
Wildcards are a focused tool, not a shortcut around hostname inventory. They work best when a product intentionally serves a variable name space and the application performs safe, explicit host routing. For foundational context, see DNS record types explained and what a CNAME does. A public DNS lookup can confirm what a resolver returns for a chosen name, while application tests confirm that the endpoint treats that name correctly.
Test both expected and unexpected names
A wildcard deployment should be tested with more than one known-good tenant name. Check a name that should be handled, a name that should have an explicit override, and a random name that should not exist. Then inspect both DNS answers and the application's response. A wildcard can route an unknown label to the service, but the application should return a safe not-found response rather than creating an accidental default account or leaking configuration. Repeat tests after adding explicit records and delegations, because DNS tree structure can change which wildcard data applies. Document the intended name pattern so future operators know whether a newly resolving subdomain is expected or a configuration surprise.
Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.
Related reading
A CNAME aliases a name, not an address
www.example.com
CNAME record
cdn.provider.net
target hostname
192.0.2.10
A record, final answer
CNAME Chains Explained: How DNS Aliases Resolve
Understand how CNAME records create alias chains, how resolvers reach A and AAAA addresses, and what to check when a chain breaks.
How an email finds your mail server
Sender
you@gmail.com
MX lookup
who takes mail?
Mail server
priority 10 first
Inbox
delivered
Lowest priority number wins; higher numbers are backups
MX Records Explained: How Email Finds Its Way
MX records tell the internet which mail servers handle email for a domain -- and why they're structured differently from an A record.
Three layers share the name "DNS server"
Stub resolver
your own device
Recursive resolver
ISP, router, or 1.1.1.1
Authoritative
the domain's own DNS
Recursive vs. Authoritative DNS Servers: Key Differences
Two very different jobs share the word 'DNS server' -- the recursive resolver that does the asking, and the authoritative server that has the answer.