Back to Articles
Guide2026-07-08•5 min read•CSR.plus Team

Wildcard Certificates and DNS-01: Coverage and Issuance

Wildcard Certificates and DNS-01: Coverage and Issuance

Wildcard Certificates and DNS-01: Coverage, Issuance and Troubleshooting

Direct answer: a wildcard can only be issued through DNS-01 — HTTP-01 cannot prove control over "any subdomain". Before you order, fix the misunderstanding that causes the most outages: *.example.com covers one label only, so it does not cover the apex example.com and does not cover a.b.example.com. Real orders therefore list example.com and *.example.com together. The flow: publish a _acme-challenge TXT record (or CNAME-delegate it to a dedicated validation zone), wait for propagation, then let your ACME client validate and renew automatically.

Coverage at a glance

Name in the certificateMatchesDoes not match
*.example.comwww / api / shop.example.comexample.com (apex), a.b.example.com
example.comthe apex onlyany subdomain
*.example.com + example.comone label + apexa.b.example.com (needs *.b.example.com)

Core concepts

1. The boundary is one label

RFC 9525 (which replaced RFC 6125 in 2023) allows a wildcard only as the complete content of the left-most label, and says it "can only match one label in a reference identifier". You can watch openssl enforce it:

for h in www.example.com a.b.example.com example.com; do
  echo "== $h"; # root.pem = issuing root, chain.pem = intermediate bundle
  openssl verify -CAfile root.pem -untrusted chain.pem -verify_hostname "$h" wildcard.pem
done
# == www.example.com → OK
# == a.b.example.com → error 62 hostname mismatch
# == example.com     → error 62 hostname mismatch

2. Why DNS-01 is mandatory

*.example.com implies an unbounded set of hostnames; a CA cannot fetch a file from every one of them. Writing a record at the zone level is the only workable proof of control over the whole domain.

3. What the TXT record contains

The client concatenates the token with a thumbprint of your account key, hashes it with SHA-256, base64url-encodes the digest, and publishes the result as a TXT record at _acme-challenge.<domain>. Multiple TXT values may coexist under that name, so parallel orders do not collide.

4. CNAME delegation limits credential blast radius

Point _acme-challenge.<domain> at a dedicated validation zone; the DNS API token then needs TXT-write rights on that zone only, never on your primary domain.

5. One key, whole namespace

A wildcard is one private key valid for every subdomain at that level, including ones nobody has created yet. It usually gets copied to every server that answers for those names, and each copy is another place it can leak. Whoever holds it can present a trusted certificate for login.example.com, internal-admin.example.com or any invented name.

6. What CT logs reveal

A wildcard publishes only *.example.com; the actual subdomains never appear in the certificate, so CT never indexes them. A multi-SAN certificate publishes every name it carries, which is exactly what attackers read logs for. That is the wildcard's one genuine security advantage — weigh it against the blast radius above.

Issue and renew in 6 steps

Step 1 — List the names you really need. Apex included? Any dev.api.example.com-style nested hosts? The latter needs its own *.api.example.com. Generate the key and CSR with the CSR Generator — it runs in your browser and the key never leaves your machine.

Step 2 — Confirm DNS-01 is available. If you issue through a panel or hosting provider, check that it supports DNS-01; otherwise a wildcard order is rejected outright.

Step 3 — Create DNS API credentials. Issue a dedicated token with TXT read/write only — never full zone administration.

Step 4 — Set up CNAME delegation (recommended)

_acme-challenge.example.com.  CNAME  _acme-challenge.acme-validate.example.net.

Credentials for the validation zone stay separate; your primary DNS account never touches the ACME flow.

Step 5 — Order with both names

certbot certonly --dns-<provider> -d "example.com" -d "*.example.com"

After issuance, run the Certificate & Key Matcher to confirm the certificate matches its key, and the SSL Checker to verify the served chain.

Step 6 — Automate renewal. The maximum lifetime of a publicly trusted certificate dropped to 200 days on 2026-03-15, falling to 100 days on 2027-03-15 and 47 days on 2029-03-15; manual renewal is not sustainable. Verify the timer: systemctl status certbot.timer, or test with certbot renew --dry-run.

Troubleshooting checklist

SymptomCauseFix
Order rejected, wildcard unsupportedHTTP-01 was usedSwitch to DNS-01
NXDOMAIN on the TXT lookupRecord not propagated or wrong nameRe-check with dig TXT _acme-challenge.example.com
Intermittent validation failuresTTL not expired, authoritative NS out of syncValidate only after all NS agree
CNAME delegation still failsTarget returns no TXT, or CAA restricts the CACheck the end of the delegation chain and your CAA records
Apex reports hostname mismatchWildcards do not cover the apexAdd example.com to the order
a.b.example.com reports mismatchWildcard matches one label onlyIssue a separate *.b.example.com
Rate limit hitToo many failed validations for one identifierBack off; consult your CA's published limits
Some servers still serve the old certificateThe wildcard key was copied to many machinesCentralise distribution, or use per-host certificates

Go deeper

Tools: CSR Generator · Certificate & Key Matcher · SSL Checker

Related: ACME HTTP-01 vs DNS-01 · CAA Records Explained · SSL Certificate Formats Explained

Deep dives: SSL Certificates: The Complete Guide · Certificate Types Compared · ACME HTTP-01 vs DNS-01: Which Challenge to Use?

FAQ

Does *.example.com protect example.com?

No. A wildcard never matches the apex; add example.com explicitly to the SAN.

Does it protect dev.api.example.com?

No. It matches a single label, so nested hosts need *.api.example.com.

Can a wildcard be issued with HTTP-01?

No. DNS-01 is the only validation path for wildcards.

Which is safer, a wildcard or a SAN certificate listing every host?

Trade-off: a leaked wildcard key compromises the entire subdomain level, while a SAN certificate publishes every hostname into public CT logs, handing attackers an asset inventory. Splitting along trust boundaries is usually best.

How much does a wildcard cost?

Prices vary widely by brand and validation level — compare options with the [SSL certificate selector](/ssl/choose).

Free SSL/TLS tools

Verify and inspect your certificates in seconds.

Related Certificate Info

Learn more about choosing and buying certificates.