Wildcard SSL Certificates: Subdomain Protection, Installation, and Limitations
What the asterisk in a certificate means, why DNS-01 is required for issuance, when Wildcard is convenient, and how it differs from SAN.


Illustrations created specifically for this guide. The interfaces and certificate examples shown are illustrative; actual settings should be checked on the certificate authority or hosting provider’s website.
1. What Is Wildcard SSL
A Wildcard certificate is a TLS certificate in which the name of the protected host is written with an asterisk. For example, the entry *.example.ru lets you use one certificate for shop.example.ru, mail.example.ru, and blog.example.ru. Wildcard is not a separate level of owner verification: it is usually a DV certificate issued after control over the domain has been confirmed. The certificate provides encryption and verifies the server name, but it does not verify the honesty of an online store or protect against application errors.
The word wildcard means a pattern. The asterisk replaces only one label to the left of the specified domain, not an arbitrary chain of nested subdomains. This is a key rule when designing a site structure.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
2. Which Addresses the Asterisk Protects
A certificate with the name *.example.ru is valid for www.example.ru, api.example.ru, and crm.example.ru. It is not valid for example.ru without a subdomain, or for dev.api.example.ru, because in the latter case there are two labels before example.ru. To protect both example.ru and *.example.ru, the certificate must include both names in the Subject Alternative Name (SAN) extension.
An asterisk in a certificate does not create subdomains in DNS or configure the web server. Each active name still requires valid DNS records and hosting configuration.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
3. Wildcard, SAN, and Standard Certificates
A standard certificate for www.example.ru covers the specific name listed in SAN. A multi-domain certificate lists several names: example.ru, shop.example.ru, example.com. Wildcard uses the *.example.ru pattern for all subdomains at one level. These approaches can be combined: a certificate can include both standard names and wildcard names, if the certification authority allows this configuration.
For two or three fixed sites, it is often simpler to issue separate certificates with automatic renewal. Wildcard is more useful when subdomains are created frequently, but it requires more careful handling of the private key.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
4. When You Really Need Wildcard
A typical use case is a service where each customer has their own subdomain: firma1.example.ru, firma2.example.ru, and so on. Another example is infrastructure with several internal dashboards accessible through public domain names. Wildcard lets you avoid reissuing a certificate every time a new subdomain is added, as long as the name matches the pattern.
However, Wildcard is not always the best option. If each application runs on its own server and is maintained by an independent team, separate certificates reduce the impact of a private key leak.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
5. When It’s Better to Avoid Wildcard
If the site only has example.ru and www.example.ru, a certificate with two SAN names is sufficient. If independent contractors manage the subdomains, sharing a key creates an unnecessary dependency. If you need a certificate for a second-level subdomain, such as pay.eu.example.ru, the *.example.ru pattern will not solve the problem.
When choosing, consider not only the certificate price, but also the effort required to issue it, store keys, monitor them, revoke them in the event of compromise, and replace the certificate on all hosts.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
6. How to Prove Domain Ownership
DNS-01 verification is usually used to issue Wildcard certificates through ACME. The client creates a TXT record such as _acme-challenge.example.ru with a special value provided by the certification authority. The authority checks DNS and issues the certificate after successful verification. HTTP-01 verification is not suitable for a wildcard identifier.
A DNS record is not a permanent password: the challenge value changes with each new verification. Never publish a DNS provider API token in an article, repository, or client-side JavaScript.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
7. Free Wildcard from Let’s Encrypt
Let’s Encrypt supports issuing wildcard certificates with DNS-01 verification. Issuance is free. However, automation depends on the DNS provider: it is easier when an official or supported API plugin is available. If there is no API, you can create the TXT record manually, but this makes regular renewal more difficult.
Do not promise that a particular button in a hosting control panel supports Wildcard: interface capabilities change. Check the hosting and DNS provider documentation before getting started.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
8. Preparing to Issue a Certificate
Before issuance, check the domain registration, access to the authoritative DNS zone, server access, and backup of the current configuration. Find out where the NS servers are: the domain may be registered with one company while DNS is hosted by another. The TXT record must be created with the actual DNS provider.
It is also worth checking CAA records. They can restrict which certification authorities are allowed to issue certificates for the domain, and the issuewild parameter can separately control wildcard issuance.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
9. Issuing a Certificate with Certbot: Overview
Install the latest Certbot and a DNS plugin compatible with the provider in use on the server. Create a token with the minimum permissions required to modify the relevant DNS zone. Then issue a certificate for two names: example.ru and *.example.ru. The specific command depends on the plugin and how it is installed.
The command certbot certonly --manual --preferred-challenges dns -d example.ru -d "*.example.ru" demonstrates the manual DNS-01 method, but does not provide fully automatic renewal without additional hooks. A supported DNS plugin is preferable for production use.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
certbot certonly --manual --preferred-challenges dns \
-d example.ru -d "*.example.ru"Warning: the manual command is shown to explain the process. Automatic renewal requires additional configuration.
10. DNS-01: Errors and Delays
The TXT record may not appear immediately on all authoritative servers. Checking before the record has propagated results in a verification error. Account for the TTL, ensure the _acme-challenge name is correct, check for multiple TXT values during parallel verifications, and make sure there are no extra spaces in the value.
For troubleshooting, you can use dig TXT _acme-challenge.example.ru and query a specific authoritative DNS server. If there are problems, first check the actual DNS response rather than repeatedly attempting issuance.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
11. Installation on Nginx
After successful issuance, the server receives the certificate and private key files. For Nginx, ssl_certificate is usually set to the full certificate chain and ssl_certificate_key to the private key. Then run nginx -t and, only if the configuration check succeeds, safely reload the server.
Private key files must be accessible only to the necessary system user. Do not copy them to a public site directory or send them over unsecured channels.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
server {
listen 443 ssl;
server_name shop.example.ru;
ssl_certificate /etc/letsencrypt/live/example.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.ru/privkey.pem;
}
# Проверка: sudo nginx -t12. Installation on Apache
For Apache, set SSLCertificateFile and SSLCertificateKeyFile in the HTTPS virtual host. The specific configuration depends on the Apache version, operating system, and installation method. After making changes, run apachectl configtest, then apply the new configuration.
If the server hosts multiple sites, check that ServerName, ServerAlias, and the selected certificate match. Having a Wildcard file on disk does not guarantee that Apache will serve it for the right name.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
<VirtualHost *:443>
ServerName shop.example.ru
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.ru/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.ru/privkey.pem
</VirtualHost>13. Renewal Without Downtime
Automatic Wildcard renewal requires DNS control to be verified again. Therefore, when using an ACME client and DNS API, check the token permissions, expiration date, and client schedule in advance. After renewal, the service must reload the updated certificate files, or it will continue serving the old certificate.
The certbot renew --dry-run test is useful, but does not replace monitoring the actual certificate served by the public server. Track the certificate expiration date separately on every endpoint.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
14. Risks of Sharing a Private Key
If a single Wildcard certificate and its private key are installed on many servers, a compromise of one server can affect all names protected by that certificate. If a key leak is suspected, replace the key, reissue the certificate, and update the configurations of all dependent services.
To reduce risk, restrict access to the key, use separate keys for different environments, use secret stores, log operations, and automate certificate delivery. Wildcard does not eliminate the need to keep server software up to date.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
15. Price and Choosing a Provider
Free Wildcard from Let’s Encrypt is suitable for many standard websites and applications. Commercial offerings may include support, help with installation, and additional services. Compare the specific terms: verification type, names covered, automation support, reissuance options, renewal periods, and costs.
A paid certificate does not automatically provide stronger encryption than a free one: with comparable algorithms and correct configuration, the cryptographic protection level is determined by the connection settings, not the product price.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
16. Wildcard and Visitor Security
The certificate confirms that the browser connected to a server presenting a valid certificate for the requested name and allows a secure channel to be established. It does not prove that the page content is safe, that the seller keeps their promises, or that the site contains no malicious scripts.
Do not promise an automatic boost in search rankings just from buying Wildcard. HTTPS is important for trust and the proper functioning of the web, but SEO also depends on content, technical condition, and many other factors.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
17. Checking an Installed Wildcard
After setup, open several subdomains over HTTPS and check the certificate in a browser. Check the SAN names, issuer, validity period, trust chain, and make sure there are no warnings. You can also use openssl s_client -connect shop.example.ru:443 -servername shop.example.ru to view the certificate with the correct SNI.
Checking only the main domain is not enough. Test the actual addresses of every service, including those running behind a load balancer or CDN: visitors see the certificate at their specific connection point.
An important difference between TLS and DNS is that DNS helps find an IP address, while a certificate helps verify a host’s identity when a TLS connection is established. Working DNS does not mean that HTTPS is configured correctly. Conversely, a valid certificate will not fix an incorrect DNS record. These two parts of the infrastructure are checked independently.
openssl s_client -connect shop.example.ru:443 \
-servername shop.example.ru18. Common Wildcard Errors
The first mistake is expecting *.example.ru to protect example.ru. The second is trying to protect dev.api.example.ru with a first-level pattern. The third is choosing HTTP-01 instead of DNS-01 for wildcard issuance. The fourth is installing a certificate without the correct SNI or reloading the server. The fifth is failing to monitor the expiration date.
Start troubleshooting by identifying the exact name opened in the browser, then check SAN, DNS, the TLS configuration, and the certificate actually being served. Reinstalling certificates without a clear plan can only make troubleshooting more difficult.
If a certificate is used on multiple hosts, it is helpful to keep a table with the service name, IP or load balancer, key storage location, installation method, next check date, and person responsible for renewal. This table is especially important after a hosting migration: old servers sometimes continue handling some requests and present an outdated certificate.
19. Frequently Asked Questions and Conclusion
Can you get a Wildcard certificate for free? Yes, for example through Let’s Encrypt using DNS-01. Does it protect the root domain? Only if the root domain is included separately in the SAN. Does it work for any number of subdomains? For matching single-level names, without a predefined list. Can it be used on multiple servers? Technically, yes, but sharing a key increases risk and requires strict access management.
The main rule for choosing is simple: Wildcard is convenient when you have many single-level subdomains and a manageable DNS infrastructure. For independent services, separate certificates and keys are often safer.
A practical example helps avoid confusion: browser addresses are compared by DNS labels separated by dots. The https:// protocol and the path after the slash are not part of the name checked against the certificate. If the name does not match the SAN, the browser will show a warning even if the certificate is within its validity period. So, when configuring a certificate, first make a complete list of addresses, then choose a template.
Official sources and further reading
- Let’s Encrypt: Domain Validation Methods
- Certbot: Official Website
- RFC 6125: Server Identity Verification
- Nginx: HTTPS Configuration
- Apache HTTP Server: SSL/TLS
Technical commands need to be adapted to the specific server and DNS provider. This material is for reference purposes.