Disclosure: CloudPicked may receive compensation from brands featured in this article. See our Disclosure page for details.
Wildcard SSL Certificate Guide

Complete Guide to Wildcard SSL Certificates

Protecting multiple subdomains with a single certificate

If you run a website with multiple subdomains like blog.example.com, shop.example.com, and api.example.com, protecting all of them with HTTPS can be expensive and complex. The most cost-effective and simple solution is a Wildcard SSL Certificate. This guide explains what Wildcard SSL is, how it works, and how to choose the right certificate for your situation.

What is a Wildcard SSL Certificate and How Does It Differ from Single-Domain SSL?

A Wildcard SSL Certificate is designed to protect (encrypt) a primary domain and an unlimited number of subdomains under the same domain name, using a wildcard pattern represented by an asterisk *.

For example, a Wildcard SSL for *.example.com can protect:

In contrast, a Single-Domain SSL protects only one domain, such as example.com. If you want to protect blog.example.com, you would need to purchase a separate certificate, which is more expensive and difficult to manage.

Key Difference: Single-Domain SSL = protects only 1 domain / Wildcard SSL = protects the primary domain + all subdomains with a single certificate

Understanding *.domain.com: What Subdomains Are Covered (and Which Are Not)?

This is where many people get confused. Wildcard SSL *.example.com covers only 1 subdomain level, not every possible level.

Protected Subdomains:

Not Protected:

If you need to protect deeper subdomain levels like sub.blog.example.com, you would need to purchase an additional Wildcard SSL for *.blog.example.com or use a Multi-Domain SSL instead.

Important: *.example.com covers xxx.example.com only, not xxx.yyy.example.com or the primary domain example.com (configuration-dependent)

Wildcard SSL vs Multi-Domain SSL (SAN): Which Should You Choose?

Besides Wildcard SSL, another option is Multi-Domain SSL (Subject Alternative Name - SAN). This certificate allows you to specify multiple domains in a single certificate, but with a limited number, unlike Wildcard which has no limits.

Factor Wildcard SSL Multi-Domain SSL
Unlimited domain protection ✓ (1 level only) ✗ (Limited)
Protect subdomains ✓ Ideal △ Must specify each
Protect multiple domains ✗ No ✓ Yes
Price Moderate More expensive

Choose Wildcard SSL if: You have multiple subdomains of the same domain and want easy management.

Choose Multi-Domain SSL if: You have multiple different domains (example.com, myshop.com, myapi.net) but don't have many subdomains.

Free Let's Encrypt Wildcard Certificates via DNS Challenge

Let's Encrypt is the world's most trusted and free SSL certificate authority. Since 2016, Let's Encrypt has offered free Wildcard Certificates to the public with security equivalent to commercial CAs.

Basic Steps to Get Let's Encrypt Wildcard:

  1. Use a tool like Certbot that supports ACME protocol
  2. Configure to use DNS-01 Challenge (not HTTP-01)
  3. Prove domain ownership to Let's Encrypt by adding a DNS TXT record
  4. Receive a Wildcard certificate valid for 90 days

Critical: Let's Encrypt Wildcard requires DNS-01 Challenge only, not HTTP-01. You need a way to add DNS TXT records (via DNS management system or API)

Example Certbot command:

sudo certbot certonly --dns-cloudflare \
  -d example.com -d *.example.com \
  --dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini

Certbot will automatically add the DNS TXT record (if you configured Cloudflare API key) and issue a free Wildcard certificate.

Let's Encrypt Wildcard Advantages:

Let's Encrypt Wildcard Limitations:

Purchasing Wildcard SSL from Commercial Certificate Authorities

If you need a legally binding Wildcard SSL with EV or 1-3 year validity, you can purchase from commercial CAs like Comodo, Sectigo, GlobalSign, or DigiCert.

Average Wildcard SSL Pricing:

Key differences:

For most users, DV Wildcard SSL is sufficient because the encryption security is identical across DV, OV, and EV. The difference is only in "company identity verification".

How to Install Wildcard SSL on Apache/Nginx/DirectAdmin

General Steps (Apache, Nginx, DirectAdmin):

Step 1: Obtain Certificate and Private Key Files

Whether from Let's Encrypt or a commercial CA, you'll get two files:

Step 2: Upload to Server

scp certificate.crt [email protected]:/etc/ssl/certs/
scp private.key [email protected]:/etc/ssl/private/

Step 3: Configure Apache

Edit your configuration file like /etc/apache2/sites-available/default-ssl.conf:

<VirtualHost *:443>
    ServerName example.com
    ServerAlias *.example.com
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/certificate.crt
    SSLCertificateKeyFile /etc/ssl/private/private.key
</VirtualHost>

Then restart Apache:

sudo systemctl restart apache2

Step 4: Configure Nginx

Edit your configuration file like /etc/nginx/sites-available/default:

server {
    listen 443 ssl;
    server_name example.com *.example.com;

    ssl_certificate /etc/ssl/certs/certificate.crt;
    ssl_certificate_key /etc/ssl/private/private.key;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
}

Then restart Nginx:

sudo systemctl restart nginx

Step 5: Configure DirectAdmin (Easiest)

If you're using DirectAdmin, simply:

  1. Go to Admin Panel → Certificate Management
  2. Select "Install Certificate"
  3. Paste Certificate, Key, and CA Certificate
  4. Specify Domain: *.example.com
  5. Click "Install"

DirectAdmin will automatically configure Apache/Nginx settings.

Renewing Wildcard SSL Certificates

All SSL certificates have expiration dates. Most are valid for 1 year (commercial CAs) or 90 days (Let's Encrypt).

Renewing Let's Encrypt (Automatic):

Let's Encrypt has automatic renewal via cron job:

0 2 * * * /usr/bin/certbot renew --quiet

This command checks certificates daily at 2 AM and automatically renews any certificate expiring within 30 days.

Renewing Commercial CA Certificates:

  1. Log into your CA's control panel
  2. Find the certificate to renew
  3. Select "Renew" and complete payment
  4. Follow validation steps (usually email approval)
  5. Download the new certificate
  6. Install on your server (as in Step 6 above)

Tip: Set up a reminder 60 days before expiration to avoid forgetting renewal.

Wildcard SSL Security Considerations: What If the Private Key Is Compromised?

The main risk of Wildcard SSL is that if your Private Key is stolen or leaked, attackers can impersonate any subdomain under your domain.

Example: If you have a Wildcard SSL for *.bank.com and the Private Key leaks, attackers could:

Protection Methods:

Important: Wildcard SSL has higher management risk than Single-Domain SSL because one certificate protects multiple domains.

Is Wildcard SSL Worth It Compared to Free Let's Encrypt?

Short Answer: If you can use Let's Encrypt, don't pay for anything. But there are cases where commercial Wildcard SSL makes sense.

When Let's Encrypt Wildcard is Perfect:

When Commercial Wildcard SSL Is Better:

Criteria Let's Encrypt Commercial Wildcard
Cost Free $25-240+/year
Encryption Security Equivalent Equivalent
EV (Green Bar) No Yes (EV Certificate)
Renewal Automation 100% Automatic CA Dependent
Support Warranty None Yes (some CAs)

Conclusion: For personal use, small to medium businesses, free Let's Encrypt Wildcard is the best choice. If you need professional validation and EV badges, commercial Wildcard SSL is worth the investment.

RecommendedAsiaGB.com — Web Hosting & VPS we use and recommend. Servers in Thailand and Singapore with SSD storage, DirectAdmin panel, 24/7 Thai language support, and 99% uptime.

AsiaGB.com — hosting & VPS we use and recommend: TH/SG servers, SSD storage, DirectAdmin, 24h Thai support, 99% uptime.

Visit AsiaGB →

Frequently Asked Questions

Q: Can Wildcard SSL protect deeper subdomain levels like sub.blog.example.com?
A: No. Wildcard SSL *.example.com protects blog.example.com but not sub.blog.example.com. You would need an additional Wildcard SSL for *.blog.example.com to protect deeper levels.
Q: Does Let's Encrypt Wildcard require DNS Challenge only?
A: Yes. Let's Encrypt Wildcard requires DNS-01 Challenge exclusively, not HTTP-01. You must have a way to add DNS TXT records.
Q: Is Wildcard SSL less secure than Single-Domain SSL?
A: The encryption security is identical. However, Wildcard has higher management risk because one Private Key protects multiple domains. If compromised, an attacker can impersonate any subdomain.
Q: How long are Wildcard SSL certificates valid?
A: It depends on the CA. Most are valid for 1 year (must renew annually). Let's Encrypt is 90 days. Some CAs offer 2-3 year validity.
Q: Can I upgrade a Single-Domain SSL to Wildcard?
A: No. You must request a new Wildcard certificate. You cannot upgrade an existing certificate. Most CAs offer refunds if you cancel and replace within the same month.
Q: What is the difference between DV, OV, and EV certificates?
A: DV only verifies domain ownership (cheapest, fastest). OV verifies organization information (moderate price). EV does thorough verification and displays a "Verified Organization" badge (most expensive, highest trust).