Get a Pentest and security assessment of your IT network.

Cyber Security

Wildcard vs Subdomain SSL Certificates

TL;DR

Wildcard certificates are cheaper and easier to manage for many subdomains. Per-subdomain certificates offer more control and can be better if you have a few critical subdomains with specific security needs. Choose based on the number of subdomains, your budget, and how much flexibility you require.

Understanding SSL Certificates

SSL (Secure Sockets Layer) certificates encrypt data transmitted between a web server and a user’s browser. This is essential for securing websites and building trust with visitors. There are two main types relevant to this discussion:

  • Wildcard Certificates: Secure a domain and all its first-level subdomains (e.g., *.example.com secures www.example.com, blog.example.com, shop.example.com).
  • Per-Subdomain Certificates: Require a separate certificate for each subdomain (e.g., one certificate for www.example.com, another for blog.example.com).

1. Cost Comparison

Generally, wildcard certificates are more cost-effective when you have many subdomains.

  • Wildcard: One certificate covers multiple subdomains, reducing the overall cost.
  • Per-Subdomain: Costs increase linearly with the number of subdomains. If you have 10 subdomains, you’ll need to purchase and manage 10 separate certificates.

2. Management Complexity

Wildcard certificates simplify certificate management.

  • Wildcard: Renewing one wildcard certificate renews security for all covered subdomains.
  • Per-Subdomain: You must track and renew each individual certificate, which can be time-consuming and prone to errors.

3. Installation Process

The installation process is similar for both types but differs slightly depending on your web server.

  • Wildcard: Install the certificate as you would any other SSL certificate, specifying the domain name (e.g., example.com).
  • Per-Subdomain: Repeat the installation process for each subdomain, ensuring the correct Common Name (CN) is used in the certificate request.

4. Flexibility and Control

Per-subdomain certificates offer greater flexibility.

  • Wildcard: All subdomains share the same security configuration. This can be a limitation if you need different levels of validation or specific settings for individual subdomains.
  • Per-Subdomain: Allows independent control over each subdomain’s certificate, including:
    • Different validation methods (e.g., Domain Validation, Organization Validation).
    • Specific key sizes and encryption algorithms.
    • The ability to reissue a single subdomain’s certificate without affecting others.

5. Security Considerations

Both types provide strong security when properly implemented.

  • Wildcard: If the private key for a wildcard certificate is compromised, all subdomains are at risk. Secure storage of the private key is crucial.
  • Per-Subdomain: Compromising one subdomain’s certificate doesn’t affect others. However, managing multiple keys increases the overall attack surface.

6. Example Scenario

Let’s say you have a website with these subdomains:

  • www.example.com
  • blog.example.com
  • shop.example.com
  • mail.example.com
  • support.example.com

Wildcard Certificate: A single wildcard certificate for *.example.com would be the most efficient option.

Per-Subdomain Certificates: You’d need five separate certificates, increasing cost and management overhead.

7. Checking Certificate Details

You can verify which type of certificate a website uses by inspecting it in your browser.

  • Chrome/Edge: Right-click on the page → Inspect → Security tab. Look at the ‘Issued to’ field. A wildcard certificate will show something like *.example.com.
Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation