Wildcard vs SAN certificates: what each one actually covers
A wildcard certificate like *.example.com and a multi-domain SAN certificate solve the same problem, covering more than one hostname, in different ways with different limits. AdminKit explains what each actually covers: a wildcard matches exactly one subdomain label under one base domain, while a SAN certificate lists an explicit, individually validated set of hostnames, including entirely different domains.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- A wildcard such as
*.example.commatches exactly one label in the left-most position. It coverswww.example.combut notexample.comora.b.example.com. - A SAN (multi-domain) certificate lists each hostname explicitly, and the names can span unrelated domains. Let’s Encrypt allows up to 100 per certificate.
- Most certificates mix the two: the apex plus a wildcard, as two SAN entries.
- Let’s Encrypt only issues wildcards through the DNS-01 challenge, so your DNS has to be automatable.
- The real trade-off is key blast radius and visibility in public logs, not cryptographic strength.
How can one certificate cover more than one hostname?
A single certificate can be issued for more than one hostname, and there are two distinct ways to do it: a wildcard entry, which matches an entire class of names at once, and explicit SAN (Subject Alternative Name) entries, which each name one specific host. Both ultimately show up in the same SAN extension RFC 5280 defines — a wildcard is simply a SAN entry that starts with *. — but they cover fundamentally different things, and conflating the two is the most common reason someone discovers a certificate doesn’t cover a hostname they assumed it did.
Here is how one certificate that uses both looks in OpenSSL’s output. It is an illustrative example for the documentation domain example.com, not a real certificate:
$ openssl x509 -in example.com.pem -noout -ext subjectAltName
X509v3 Subject Alternative Name:
DNS:example.com, DNS:*.example.com, DNS:example.net
Three entries, three different jobs: the apex, a wildcard for one level of subdomains, and a second, unrelated domain.
What does a wildcard actually match?
A wildcard entry like *.example.com matches any name that substitutes something for that single leading label — mail.example.com, app.example.com, anything.example.com — but nothing else. RFC 6125 §6.4.3 (also on the IETF Datatracker) restricted wildcard matching to the left-most label position in a presented identifier. Its replacement, RFC 9525 §6.3, states the rule more strictly: there is only one wildcard character, it is the complete content of the left-most label, and it “can only match one label”. A presented name that breaks these rules “is invalid and MUST be ignored”. That has two consequences that surprise people who assume “wildcard” means “everything under this domain”:
- It does not cover the bare apex.
*.example.comdoes not matchexample.comitself — the bare domain has no label in the wildcard’s position. A certificate meant to cover both needs the apex added as its own separate SAN entry, which is why publicly trusted certificates for a domain and itswwwor wildcard subdomains commonly list the apex explicitly alongside the wildcard rather than relying on the wildcard alone. - It does not cover a second level of subdomains.
*.example.commatchessub.example.combut nota.b.example.com, which has two labels ahead of the base domain instead of one. CAs following the CA/Browser Forum’s Baseline Requirements do not issue multi-label wildcards like*.*.example.comto work around this — a deeper subdomain needs either its own listed name or its own wildcard certificate scoped one level down.
| Hostname a client connects to | Matches *.example.com? | Why |
|---|---|---|
www.example.com | Yes | One label in the wildcard position |
API.Example.com | Yes | DNS names are compared case-insensitively |
example.com | No | No label in the wildcard position |
a.b.example.com | No | Two labels; a wildcard matches only one |
www.example.net | No | Different base domain |
Partial-label patterns such as f*.example.com don’t meet RFC 9525’s “complete content of the left-most label” rule, so a client following it ignores them. Don’t rely on them.
What does a SAN (multi-domain) certificate actually cover?
A SAN certificate — sometimes called a UCC (Unified Communications Certificate) or multi-domain certificate — lists an explicit, enumerated set of hostnames instead of matching a pattern. Each name is independently validated by the issuing CA before being added, and unlike a wildcard, those names don’t need to share a base domain at all: one certificate can legitimately cover example.com, www.example.com, and a completely unrelated example.net together, something no wildcard, however it’s written, can ever do on its own.
The list has a size limit set by each CA. Let’s Encrypt’s rate limits page says a single certificate can include up to 100 identifiers. It also notes that fewer names per certificate is better for performance.
The tradeoff is operational: adding a new hostname to a SAN certificate means reissuing the certificate with the updated list, while a wildcard automatically covers any new name that fits its one matching label without touching the certificate at all.
How is each type issued and validated?
The CA has to validate every name on the certificate, and wildcards add two extra rules.
First, the Baseline Requirements (§3.2.2.6) make the CA check whether the part after *. is a public suffix or registry-controlled. If it is, the CA must refuse unless the applicant controls the entire namespace. A CA may issue *.example.com to the owner of example.com, but not *.co.uk.
Second, the validation method is narrower. Let’s Encrypt’s challenge types page says HTTP-01 “cannot be used to issue wildcard certificates”; wildcard issuance must use DNS-01. DNS-01 means publishing a TXT record for every issuance or renewal, so in practice your ACME client needs API access to your DNS provider. Let’s Encrypt warns that keeping DNS API credentials on a web server is risky, and suggests narrowly scoped credentials or running validation from a separate server.
| Wildcard entry | Explicit SAN entries | |
|---|---|---|
| Names covered | Any one label under one base domain, now or later | Exactly the names listed |
| Unrelated domains on one certificate | No | Yes |
| ACME challenge at Let’s Encrypt | DNS-01 only | HTTP-01, DNS-01 or TLS-ALPN-01 |
| New hostname added | No reissue needed | Reissue with the new list |
| Names visible in public CT logs | Only *.example.com | Every listed name |
That last row comes from Certificate Transparency: every publicly trusted certificate is logged, and anyone can search the logs. A SAN certificate publishes each hostname it lists; a wildcard publishes only the pattern. See Certificate Transparency logs explained for how that works.
What is the real tradeoff: coverage or blast radius?
Choosing between them isn’t about which is more “secure” in a cryptographic sense — the key and signature algorithms are identical either way. It’s about two practical differences:
- Coverage shape. A wildcard effortlessly covers an unknown, growing set of names at one subdomain level under one base domain. A SAN certificate covers an exact, fixed list that can span multiple unrelated domains, but every addition requires reissuing.
- Key compromise blast radius. A compromised wildcard private key is valid for every hostname matching that label, including ones that don’t exist yet — a single leak can affect an entire, open-ended set of subdomains. A compromised SAN certificate’s key only affects the specific, already-known names it was issued for, which is one reason some organizations deliberately avoid wildcards for anything handling sensitive traffic even when the convenience would be welcome.
RFC 9525 §7.1 makes the same point: wildcards vouch for any single-label hostname in the domain, which is convenient for administrators but also “poses the risk of vouching for rogue or buggy hosts”.
Which one should you use?
Pick by the shape of your hostnames and by how widely one key gets copied:
| Your setup | Usual fit | Reason |
|---|---|---|
Customer subdomains created on the fly (tenant1.example.com) | Wildcard plus apex | New names work without reissuing |
| A handful of fixed names on one or two domains | SAN | Smallest blast radius, no DNS-01 needed |
Same service on example.com and example.net | SAN | A wildcard cannot span domains |
| Many servers, each with its own hostname | One SAN or single-name certificate per server | A leaked key exposes only that server’s names |
| Internal hostnames you’d rather not publish | Wildcard | Only the pattern appears in CT logs |
How do you check what your own certificate covers?
Run AdminKit’s SSL/TLS check tool against your hostname to see the exact SAN list a live certificate presents — including whether an entry is a wildcard, a specific name, or both — rather than assuming from the certificate’s nickname or how it was sold to you. The check flags a hostname that matches no SAN entry. For a name two or more labels below a wildcard, compare it against the one-label rule above yourself. See how to read a TLS/SSL certificate check result for what the other fields in that result mean, and checking TLS certificate chain completeness if the certificate’s coverage looks right but connections are still failing. If you’re also controlling which CAs are even allowed to issue for your domain in the first place, see what CAA records are and how they limit issuance; CAA has a separate issuewild tag for wildcard certificates.
This is a different wildcard mechanism from a wildcard DNS record, which answers a DNS query for any unregistered subdomain — the two happen to use the same *. notation but operate at completely different layers, and having one says nothing about whether the other is also in place. RFC 9525 says so directly: a DNS wildcard always matches at least one whole label and sometimes more, while a certificate wildcard matches exactly one.
Two other configuration details worth checking while you’re reviewing DNS and mail fundamentals: whether your zone’s apex is set up correctly in ALIAS, ANAME and CNAME flattening at the apex explained, and whether your DMARC record’s alignment setting matches how your mail is actually sent, in DMARC alignment: relaxed vs strict explained. This guide is part of AdminKit’s security basics cluster of TLS certificate guides and tools.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Does a wildcard certificate for *.example.com also cover the bare example.com?
No. A wildcard entry only matches names that have something in the wildcard's label position — *.example.com matches sub.example.com but not example.com itself, since the bare domain has no label there to match. RFC 9525 §6.3 (which replaced RFC 6125 §6.4.3 in 2023) restricts a wildcard to the complete left-most label of a presented identifier, matching exactly one label, and most publicly trusted CAs follow the CA/Browser Forum's Baseline Requirements by issuing the apex as a separate SAN entry alongside the wildcard on the same certificate rather than assuming one covers the other.
Does *.example.com also cover a deeper subdomain like a.b.example.com?
No — a wildcard only matches one label position, so *.example.com matches sub.example.com but not a.b.example.com, which has two labels in front of the base domain instead of one. Covering that deeper name needs either its own SAN entry naming it explicitly, or a separate wildcard certificate for *.b.example.com, since certificates with more than one wildcard label (like *.*.example.com) are not issued by CAs following the Baseline Requirements.
Can one certificate combine a wildcard entry with specific SAN entries, or even entirely different domains?
Yes to combining a wildcard with specific names on the same base domain — a single certificate commonly lists *.example.com alongside the bare example.com as two SAN entries. A genuinely multi-domain (sometimes called UCC or SAN) certificate goes further and lists hostnames across entirely unrelated domains, such as example.com and example.net, on one certificate; each listed name is validated independently by the issuing CA regardless of which domain it belongs to.
Is a wildcard certificate less secure than issuing individual SAN certificates?
Not cryptographically — the algorithm and key strength are the same either way. The practical difference is blast radius: a wildcard certificate's single private key, if ever compromised, is valid for every current and future hostname matching that one label position, while a compromised SAN certificate's key only affects the specific, fixed list of names it was issued for. That's a key-management tradeoff to weigh, not a difference in the certificate's own cryptographic strength.
Which one should I actually use?
A wildcard fits a setup where subdomains are created dynamically or frequently and reissuing a certificate for each new name isn't practical — a multi-tenant platform handing each customer their own subdomain is the common case. A SAN certificate fits a small, fixed, known list of hostnames, especially when some of them span different domains a wildcard couldn't cover anyway, or when limiting what a single compromised key would expose matters more than issuance convenience.
Sources
- RFC 6125 — Representation and Verification of Domain-Based Application Service Identity, §6.4.3 (wildcard matching)
- CA/Browser Forum — Baseline Requirements for TLS Server Certificates
- RFC 6125 — IETF Datatracker document record
- RFC 9525 — Service Identity in TLS, §6.3 (wildcard rules; obsoletes RFC 6125)
- Let's Encrypt — Challenge types (DNS-01 required for wildcards)
- Let's Encrypt — Rate limits (up to 100 identifiers per certificate)
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.