A Wildcard SSL is a digital certificate that secures a primary domain and an unlimited number of its first-level subdomains. It uses an asterisk (*) in the Subject Alternative Name (SAN) field, typically formatted as *.example.com alongside the apex domain example.com. This allows administrators to encrypt traffic across numerous hosts using a single key pair instead of issuing separate certificates for every service.
How it works
During a TLS handshake, the client verifies that the requested hostname matches the certificate presented by the server. When a browser connects to api.example.com or mail.example.com, the server responds with the *.example.com certificate, which validates any single label directly to the left of the base domain.
Certificate Authorities (CAs) issue wildcard certificates at Domain Validated (DV) and Organization Validated (OV) tiers. Industry baseline requirements strictly prohibit Extended Validation (EV) wildcard certificates to reduce the phishing risk of broad identity assertions. Obtaining a wildcard certificate also requires proving domain control via a DNS-01 challenge, because standard HTTP-01 file checks cannot verify ownership of arbitrary, uncreated subdomains.
Example
You can issue a free wildcard certificate using Certbot with a DNS plugin, as outlined in our Let's Encrypt Install Tutorial:
certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials ~/.secrets/cloudflare.ini \
-d example.com \
-d '*.example.com'
Once issued, the same certificate and private key files are referenced across virtual hosts in Nginx or Apache for app.example.com, staging.example.com, and any newly provisioned subdomains without reissuing the certificate.
What matters when choosing a server or hosting
- DNS API support: Automated renewals depend on your DNS provider offering an API that tools like Certbot or acme.sh can update programmatically. Without API access, you must manually add TXT records at every renewal cycle.
- Key distribution security: If you host subdomains across multiple VPS instances, you must securely replicate the private key across nodes or terminate TLS at a central load balancer.
- SNI compatibility: While modern web servers use Server Name Indication (SNI) to host multiple distinct certificates on one IP address, wildcard certificates remain useful for legacy clients or simplified reverse-proxy routing. Check our guide on how to set up SSL on a VPS for server configuration details.
Common mistakes
- Assuming multi-level coverage: A certificate for
*.example.comsecuresdev.example.com, but it will trigger a browser mismatch error oninternal.dev.example.com. Nested levels require a separate*.dev.example.comwildcard. - Omitting the apex domain: Requesting only
*.example.comleaves the rootexample.comunprotected. Always include both entries in the SAN list. - Over-sharing private keys: Copying the same private key onto dozens of unisolated servers increases the blast radius if a single machine is compromised.
FAQ
Does a Wildcard SSL slow down TLS handshakes?
No. Handshake latency depends on the cryptographic algorithm (such as ECDSA versus RSA), certificate chain length, and OCSP stapling—not whether the SAN field contains an asterisk. See our Let's Encrypt installation automation data for deployment tuning.
Can I use a wildcard certificate across different servers?
Yes. You can install the same wildcard certificate and private key on multiple web servers, load balancers, or mail servers, provided each system serves a matching first-level subdomain.
Why do free CAs require DNS validation for wildcards?
An HTTP challenge only proves control over a specific web server responding to one hostname. A DNS-01 challenge requires creating a specific TXT record at the domain's authoritative zone, proving administrative control over the entire namespace.