Free SSL for Unlimited Subdomains
If you launch subdomains often, such as customer sites, staging environments or regional pages, a wildcard certificate removes the work of issuing a certificate for each. One certificate for *.example.com covers blog.example.com, shop.example.com and any new name at that level, immediately.
Free SSL for unlimited subdomains: what a wildcard covers
| Hostname | Covered by *.example.com? |
|---|---|
| blog.example.com | Yes |
| a.b.example.com | No (two levels) |
| example.com | No, add it as a second name |
| blog.example.org | No (another domain) |
So request both: example.com and *.example.com.
Wildcards need DNS validation
Authorities only issue wildcards after a DNS-01 challenge, where you publish a TXT record at _acme-challenge.example.com. With a manual command:
sudo certbot certonly --manual --preferred-challenges dns \
-d example.com -d "*.example.com"
Certbot prints a TXT value. Add it at your DNS host, verify it appears with the DNS lookup, then continue. Manual mode does not renew by itself.
Automate renewal
Use a DNS plugin for your provider. For example, with Cloudflare DNS:
sudo certbot certonly --dns-cloudflare \
--dns-cloudflare-credentials /root/.secrets/cloudflare.ini \
-d example.com -d "*.example.com"
Create the API token with permission to edit DNS records for that zone only, set the file mode to 600, and test with sudo certbot renew --dry-run. Other plugins exist for most large DNS providers. If your provider has no API, consider moving DNS or delegating only the _acme-challenge name to a zone that does.
Free SSL for unlimited subdomains: Nginx setup
server {
listen 443 ssl;
server_name ~^(?<sub>.+)\.example\.com$;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
root /var/www/$sub;
}
Verify the setup with the SSL checker on one subdomain, and the bulk SSL checker across several.
Limits and risks
- One key, many sites. If the key leaks, every subdomain is exposed. Follow the advice in protecting private keys.
- Names are not public in logs. A wildcard hides individual subdomain names from certificate transparency logs, which can be a privacy benefit.
- Authority limits. Rate limits apply to issuance, but one wildcard certificate is a single issuance.
- Different DNS providers. If subdomains are delegated elsewhere, the wildcard still works for validation at the parent.
When not to use a wildcard
If different teams or customers control different subdomains, a shared key is a bad idea. Issue separate certificates instead. For choosing between options, see best free SSL for multiple websites.
Checking after setup
Test a subdomain that did not exist when you issued the certificate. It should work immediately once DNS and the server block exist, with no new issuance. Check that the renewal timer is active with systemctl list-timers | grep certbot, and confirm in the certificate details that both example.com and *.example.com appear.
If a browser reports a name mismatch on a deeper level, such as a.b.example.com, that is expected. Add a second wildcard for *.b.example.com or flatten the hostnames.
Related reading: free SSL for subdomains and the single subdomain route.
Frequently Asked Questions
Are wildcard certificates really free?
Yes, from authorities such as Let's Encrypt, with DNS validation.
Do I need a certificate for www as well?
www.example.com is one level under the domain, so the wildcard covers it. The bare domain still needs its own name.
How many subdomains can I use?
There is no per-subdomain limit on the wildcard itself, though your server setup has its own practical limits.
Does the wildcard cover a second level, such as eu.shop.example.com?
No. A wildcard matches one label. For two levels you need a second wildcard such as *.shop.example.com, or list each name on the certificate.
Does the wildcard cover example.com itself?
No. The apex is a separate name from *.example.com. Put both on the certificate when you serve both, which most CAs allow in one request.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.