Wildcard SSL Certificates: Plan Coverage, Keys, and Renewal
Map the hostnames a wildcard SSL certificate covers, choose where its private key lives, and verify renewal on every HTTPS endpoint.
- domains
- ssl
- tls
- guide
A wildcard TLS certificate can cover changing sets of subdomains at one level. Before ordering one, decide which hostnames must match, where TLS terminates, and how the replacement certificate reaches every endpoint. A certificate that renews successfully can still leave visitors on an old copy.
Map certificate names to the services you run
Take a service that publishes example.com, www.example.com, api.example.com, and status.eu.example.com. The TLS service identity standard limits a wildcard to the entire leftmost label. A wildcard pattern matches a single label.
| Service hostname | Does *.example.com cover it? | What to request if it is uncovered |
|---|---|---|
example.com | No | Exact name example.com |
www.example.com | Yes | Already matches |
api.example.com | Yes | Already matches |
status.eu.example.com | No | Exact name status.eu.example.com or a separately justified *.eu.example.com |
The names belong in the certificate's Subject Alternative Name extension. A wildcard DNS record controls DNS answers and does not change certificate coverage. If you need both the apex and its direct subdomains, request both identifiers or configure separate certificates at the relevant endpoints.
Choose where the private key will live
If a managed load balancer terminates HTTPS for every public subdomain, one wildcard certificate there may be operationally simple. The application servers behind the load balancer can use whatever origin authentication and encryption the architecture requires.
If several independent teams or providers terminate TLS directly, think before placing the same wildcard key in their systems. A single key then stands behind every name on the certificate. A key replacement becomes a coordinated change across those systems. Separate per-service certificates or narrower wildcard certificates can reduce the number of systems affected by a key incident or an unplanned rotation.
Record the endpoints that use the wildcard and the team responsible for each one. Include a staging hostname and an expected expiry check in your renewal procedure.
Validate the DNS challenge and test the served certificate
Let's Encrypt's challenge documentation describes DNS-01 for wildcard issuance. Confirm that the renewal client can place the challenge TXT record at the right name in the authoritative DNS. When you order the apex and its wildcard together, the challenge owner name can be shared. The CA can require more than one TXT value there. Follow the client's instructions for retaining and cleaning up those values.
Limit the authority of the renewal credential. Where your CA and DNS arrangement support it, delegate the challenge to a dedicated validation zone. Let's Encrypt documents both CNAME and NS delegation for DNS-01. That separates certificate validation from routine access to the whole zone.
After issuance, check what each endpoint actually presents. For a service you operate, openssl s_client -connect api.example.com:443 -servername api.example.com -verify_hostname api.example.com -verify_return_error requests the correct host and checks the name and trust chain against the local trust store. Inspect the served leaf certificate's dates and names with the OpenSSL x509 command. Compare the expiry with the replacement certificate. If the renewed file has changed but the endpoint date has not, investigate the deployment or reload step.
For a complete cutover test, include the apex, two existing subdomains, and any deeper name that a separate certificate covers. Repeat after renewal, and test each external TLS termination point.
