Blog | G5 Cyber Security

Multiple TLS Certificates: Improving Security

TL;DR

Yes, a website can be configured with multiple valid TLS certificates linked to different root Certificate Authorities (CAs). This isn’t common but provides redundancy and can mitigate risk if one CA is compromised. However, it adds complexity to certificate management.

How Multiple Certificates Work

Normally, a website uses one TLS certificate issued by a single CA. The browser checks this certificate against its list of trusted root CAs. If the chain of trust is valid (certificate -> intermediate certificates -> root CA), the connection is secure.

Why Use Multiple Certificates?

  1. CA Compromise: If a CA gets hacked or issues fraudulent certificates, having alternatives allows your site to remain accessible.
  2. Browser Compatibility: Historically (less common now), some older browsers had issues with specific CAs.
  3. Geographic Redundancy: Different CAs might have better coverage in different regions.
  4. Load Balancing/Multiple Servers: Each server could use a different certificate, simplifying management if you’re not using a central TLS termination point.

Setting Up Multiple Certificates – Step-by-Step

This process varies depending on your web server (Apache, Nginx, IIS) and how you manage certificates (Let’s Encrypt, commercial CA).

1. Obtain Certificates

2. Configure Your Web Server

The key is to tell your web server which certificate to use based on specific conditions (e.g., client IP address, hostname).

Apache (.htaccess or Virtual Host configuration)

<VirtualHost *:443>
  ServerName example.com
  DocumentRoot /var/www/example.com

  SSLEngine on
  SSLCertificateFile /path/to/cert1.pem
  SSLCACertificateFile /path/to/ca1.pem
  # ... other configuration...
</VirtualHost>

You would need separate VirtualHost blocks (or .htaccess rules) for each certificate, potentially using <IfModule mod_ssl> to ensure SSL is enabled.

Nginx (server block configuration)

server {
  listen 443 ssl;
  server_name example.com;

  ssl_certificate /path/to/cert1.pem;
  ssl_certificate_key /path/to/key1.pem;
  # ... other configuration...
}

Similar to Apache, you’d need multiple server blocks for each certificate.

3. Certificate Chain Management

4. Testing

5. Automation (Recommended)

Manually managing multiple certificates is error-prone. Consider using tools like:

Important Considerations

Exit mobile version