What your wildcard DNS result means
A wildcard Domain Name System (DNS) record is a zone entry whose leftmost label is an asterisk (*), such as *.example.com. When someone looks up a subdomain that does not exist in your zone, the authoritative nameserver synthesizes an answer on the fly from the wildcard record instead of returning a negative reply, following the official internet DNS wildcard standard (IETF RFC 4592).
| Test verdict | Observed probe reply | What it means for the tested branch | Operational impact |
|---|---|---|---|
| No positive answer observed | NXDOMAIN (name not found) or NODATA (no record for this type) on every probe | No wildcard behavior was seen for the sampled names and record types; other branches or types can still differ. | Expected default for explicit-only sites; unconfigured subdomains do not resolve. |
| Wildcard-like A or AAAA observed | IPv4 or IPv6 addresses returned across all generated probes | Behavior consistent with an active catch-all address record for the tested branch. | Normal for multi-tenant apps; pair with HTTPS certificates for the depths served and return HTTP 404 for unknown Host headers. |
| Wildcard-like CNAME observed | Generated names alias to an external or internal target hostname | Every unmatched subdomain follows that alias target. | Verify the target in your provider dashboard; if an external cloud target no longer reserves your hostnames, review it for subdomain takeover risk. |
| Wildcard-like MX or TXT observed | Mail exchanger or text records returned for generated names | Every unmatched subdomain inherits catch-all mail routing or text values. | A wildcard MX can direct attempted mail delivery for fake subdomains to a mail server (which decides whether to accept or reject it); wildcard TXT can confuse verification checks. |
| Mixed or inconclusive | Only some probes answered, or queries returned SERVFAIL, REFUSED, or timeouts | Split behavior, cache differences, or lookup failures prevented a clean verdict. | Failed lookups are never evidence of absence; inspect individual probes and retest. |
Two distinctions keep wildcard debugging honest. First, NXDOMAIN means the queried name does not exist, while NODATA means the resolver returned NOERROR with no record of the requested type. Second, a live DNS answer proves only what DNS returned; what your web server, TLS certificate, or mail server does with that hostname is a separate layer.
How to configure or remove a wildcard DNS record safely
Configuring or removing a wildcard DNS record safely requires scoping the asterisk to the narrowest branch you need, protecting fixed hostnames with explicit records, and aligning HTTPS certificates and HTTP 404 defaults:
- Confirm whether you need unbounded subdomains: Keep wildcard records only when your application dynamically serves arbitrary names (such as
tenant.yourapp.com), and prefer a narrower sub-zone like*.apps.example.comover root-wide*.example.com. Delete unneeded wildcard MX records so nonexistent subdomains do not route stray mail traffic to your servers. - Publish explicit records for fixed hostnames: Add dedicated records for the root domain (apex),
www,mail, and_dmarc, because a wildcard never covers the root domain and any explicit record overrides it; see our A record guide for apex setup. - Match HTTPS certificates, CAA policy, and HTTP 404 defaults: Make sure your certificate covers the subdomain depth you serve, publish a Certification Authority Authorization (CAA record) with an
issuewildtag to restrict which certificate authorities may issue wildcard certificates, and configure your web server or CDN to return HTTP 404 for unrecognized Host headers so random subdomains never serve indexable pages. - Audit wildcard CNAME targets before retiring cloud apps: Because a wildcard CNAME record aliases every unmatched subdomain to one target, verify that target still reserves your hostnames and remove unused wildcard aliases promptly.
Verify wildcard DNS records from the command line
Querying a fresh random hostname from your terminal avoids cached negative answers and lets you confirm wildcard behavior directly against any resolver:
# 1. macOS / Linux: query a fresh random name for A records (check status and answer section)
dig fresh-check-98412.example.com A +noall +comments +answer
# 2. Check a multi-level name and CNAME or MX records separately
dig nested.fresh-check-98412.example.com A +noall +comments +answer
dig fresh-check-98412.example.com CNAME +noall +comments +answer
# 3. Signed DNSSEC zones: an RRSIG label count smaller than the queried name's labels proves wildcard synthesis
dig fresh-check-98412.example.com A +dnssec +multi
# 4. Windows PowerShell and nslookup equivalents
Resolve-DnsName "fresh-check-98412.example.com" -Type A
nslookup fresh-check-98412.example.com
Avoid +short when troubleshooting overrides: +short prints nothing for both NXDOMAIN and NODATA, hiding whether an explicit record or empty parent node exists at that name.
Illustrative zone: why a wildcard answers one name and skips another
Suppose an illustrative zone contains four records: *.example.com A 192.0.2.10, www.example.com A 192.0.2.20, verify.example.com TXT "demo", and dev.api.example.com A 192.0.2.30. The tree below shows why some names hit the wildcard while others bypass it.
Interactive wildcard rule simulator (illustrative zone)
Runs locally against the 4-record example.com zone aboverandom.example.com, so the wildcard supplies the A record.
| Query | Expected answer | Why it behaves that way |
|---|---|---|
| random.example.com A | 192.0.2.10 | No explicit name exists there, so *.example.com supplies the answer. |
| www.example.com A | 192.0.2.20 | An exact existing name always uses its own record, never the wildcard. |
| verify.example.com A | NODATA (empty NOERROR) | The TXT record makes verify.example.com an existing node, disabling wildcard A synthesis there. |
| test.api.example.com A | NXDOMAIN | Because dev.api.example.com exists, api.example.com is an empty non-terminal parent node blocking *.example.com across the entire api branch. |
| example.com A | NODATA (without apex A) | The root domain never matches *.example.com and needs its own explicit record. |
How wildcard DNS matching rules work
Authoritative nameservers evaluate wildcards using tree-existence rules rather than regular expressions or simple text matching. The reference table below summarizes each rule:
| Rule | Zone file entry | Query tested | Result and reason |
|---|---|---|---|
| Leftmost asterisk only | *.example.com A 192.0.2.1 | foo.example.com A | Matches (192.0.2.1): only a standalone * as the leftmost label acts as a wildcard. |
| Multi-level subtree match | *.example.com A 192.0.2.1 | a.b.c.example.com A | Matches (192.0.2.1): one leftmost asterisk covers multiple subdomain levels whenever no existing node sits in between. |
| Root domain excluded | *.example.com A 192.0.2.1 | example.com A | Does not match (NODATA): a wildcard never answers for the root apex it lives in. |
| Same-name type shadowing | *.example.com A + sub.example.com TXT | sub.example.com A | Does not match (NODATA): any explicit record on sub disables wildcard synthesis for all record types on that exact hostname. |
| Empty non-terminal blocking | *.example.com A + dev.api.example.com A | test.api.example.com A | Does not match (NXDOMAIN): api.example.com exists implicitly as a parent node, blocking *.example.com under that branch. |
| Mid-label or partial asterisk | sub.*.example.com or dev*.example.com | sub.foo.example.com | Not a wildcard: an asterisk inside a label or in the middle of a name is treated as a literal character. |
| Wildcard NS records | *.example.com NS ns2.other.com | Any subdomain | Undefined and strongly discouraged: implementations vary and modern DNS providers reject wildcard delegation. |
Browse how every DNS record type interacts inside a zone in our DNS record types directory.
Wildcard DNS records vs. wildcard TLS certificates
Wildcard DNS and wildcard Transport Layer Security (TLS) certificates both use an asterisk, but they follow completely different depth rules. DNS can resolve multi-level subdomains from a single wildcard, whereas browser certificate verification is governed by modern HTTPS certificate hostname rules (IETF RFC 9525) that restrict a wildcard certificate to one subdomain level:
| Hostname queried | Wildcard DNS (*.example.com) | Wildcard TLS certificate (*.example.com) |
|---|---|---|
| example.com (root apex) | Never matched; requires its own apex record. | Not covered unless example.com is listed as a separate Subject Alternative Name (SAN). |
| app.example.com (one level) | Matched whenever no existing node blocks it. | Covered (matches one leftmost label). |
| a.b.example.com (two levels) | Matched whenever no existing node blocks the branch. | Rejected by browsers (SSL_ERROR_BAD_CERT_DOMAIN) unless a deeper *.b.example.com or exact certificate is installed. |
If a deep wildcard subdomain resolves in DNS yet triggers a browser warning, troubleshoot the certificate layer with our SSL certificate errors guide.
DNS provider wildcard notes
DNS hosts differ slightly in where you type the asterisk, how proxying works, and how edge cases behave. Confirm the exact rules in your account dashboard before publishing:
| DNS provider | Where to enter * | Key rules and caveats |
|---|---|---|
| Cloudflare | * as the record Name | Supports proxied (orange-cloud) wildcard A, AAAA, and CNAME records on all plans including Free. Universal SSL covers apex + one wildcard level; standard and advanced nameservers handle implicitly existing parent nodes differently, and Cloudflare Pages does not currently support wildcard custom domains. |
| AWS Route 53 | * in the Record name field | Supports wildcard A, AAAA, CNAME, MX, TXT, and SRV records (not NS at the zone apex); explicit records take priority over wildcards. |
| GoDaddy | * in the Name field | Supports wildcard A and CNAME entries; existing explicit subdomains always take precedence over the wildcard. |
| Namecheap | * in the Host field | Supports wildcard host records in Advanced DNS across A, CNAME, TXT, and URL Redirect; explicit subdomains override the wildcard. |
Need step-by-step zone instructions for a specific DNS host? Browse our DNS provider playbooks.
What this wildcard DNS tester does not check
This browser wildcard DNS tester detects catch-all behavior from live public DNS replies, not raw zone files, untested subdomain branches, or web-server and mail-server behavior:
- Raw zone-file contents: unless unauthorized Authoritative Zone Transfers (AXFR) are left open, public DNS hides your zone file, so this tool detects wildcards behaviorally from generated names.
- Untested branches and record types: a nested wildcard such as
*.app.example.comis detected only when you enterapp.example.comas the branch to test. - Web server, TLS certificate, and mail server behavior: a DNS reply does not prove whether port 443 presents a valid certificate, whether HTTP returns 404 for unknown Host headers, whether a cloud target is genuinely claimable, or whether a mail server accepts unknown recipients.
- Resolver and timing differences: split-horizon corporate DNS, negative response caching, and provider edge-case implementations can produce different answers from another network.
Frequently asked questions
Does a wildcard DNS record cover the root domain?+
No, a wildcard DNS record never covers the root domain (zone apex). A record for *.example.com only matches subdomains below example.com, so the bare root domain always requires its own explicit A, AAAA, or ALIAS record. Querying the root domain when only a wildcard exists returns NODATA (a successful reply with no matching record).
Does *.example.com match multi-level subdomains like a.b.example.com?+
Yes, in DNS resolution a single leftmost wildcard matches multi-level subdomains such as a.b.example.com whenever no explicit record or intermediate parent node blocks that branch. The catch appears at the HTTPS layer: a standard *.example.com TLS certificate covers strictly one subdomain level, so browsers show a certificate name mismatch on a.b.example.com unless a deeper wildcard or specific certificate is installed.
Why does my wildcard DNS record stop working for one specific subdomain?+
Two standard DNS tree rules cause this. First, same-name type shadowing: publishing any explicit record on that subdomain (such as a TXT verification entry or an MX record) disables the wildcard for every record type on that exact name. Second, empty non-terminal blocking: publishing a deeper record such as dev.api.example.com turns api.example.com into an existing parent node with no records of its own, blocking *.example.com across the entire api branch on standard-compliant nameservers.
What is the difference between a wildcard DNS record and a wildcard SSL certificate?+
They operate in different layers with different depth rules. A wildcard DNS record (*.example.com in your DNS zone) tells resolvers what IP address, alias, or other record to return for missing single-level and multi-level subdomains. A wildcard SSL or TLS certificate is an HTTPS credential on port 443 whose Subject Alternative Name (*.example.com) protects strictly one subdomain level and does not cover the root domain unless listed separately.
Does enabling a wildcard DNS record create security, mail, or SEO risks?+
Yes, an unneeded catch-all wildcard can introduce four operational risks. First, subdomain takeover: a wildcard CNAME pointing to a third-party cloud service aliases every unclaimed name there, so confirm that service still reserves your hostnames. Second, search index bloat: if random subdomains return 200 OK web pages instead of 404, crawlers can index junk hostnames. Third, parent-scoped cookies can be shared across arbitrary sibling subdomains. Fourth, a wildcard MX answer can direct attempted mail delivery for nonexistent subdomains to a mail server, which can generate spam bounces if that server accepts or bounces unknown recipients.
Does Cloudflare support proxied wildcard DNS records on the Free plan?+
Yes, Cloudflare supports proxied (orange-cloud) wildcard A, AAAA, and CNAME records on every plan tier, including Free. The common limit is certificate depth rather than proxying: Universal SSL covers the apex and one wildcard level (*.example.com), so deeper subdomains like a.b.example.com need an additional certificate such as Advanced Certificate Manager. Note also that Cloudflare Pages does not currently support wildcard custom domains.
Next checks
- Inspect all core DNS records for any specific hostname with the DNS record lookup.
- Compare how multiple public resolvers answer the exact same name and type in the DNS propagation checker.
- Audit CAA
issueandissuewildcertificate rules with the CAA record lookup. - Verify your zone blocks unauthorized full zone transfers with the AXFR leak checker.
- Inspect cryptographic zone signatures and delegation chains in the DNSSEC checker.