XiaTools

How to Troubleshoot SSL Certificate Chain Errors

Updated 10 Oct 2026

SSL certificate chain errors occur when a browser or client application cannot verify the complete path of trust from your website's end-entity certificate up to a trusted root Certificate Authority. When a visitor hits your site, your server must present not only your SSL certificate, but also the intermediate certificates that bridge the gap to the root store embedded in the client's operating system or browser. If any link in this chain is missing, misordered, or expired, users will encounter security warnings like "NET::ERR_CERT_AUTHORITY_INVALID" or "Your connection is not private."

Diagnosing and resolving these breaks in the trust path requires checking how your web server serves its TLS certificates. By running a quick diagnostic with the SSL Checker, you can instantly inspect your complete certificate chain, spot missing intermediate certificates, verify expiration dates, and ensure your cryptographic setup meets modern security standards. Here is how to systematically find, analyze, and fix SSL chain issues across common server environments.

Understanding the SSL Certificate Chain of Trust

The Public Key Infrastructure (PKI) relies on a hierarchy. At the top are Root CAs, whose self-signed certificates are pre-installed in operating systems, browsers, and mobile devices. Because Root CAs rarely sign end-user certificates directly (for security reasons), they issue Intermediate CAs. These intermediates sign your domain's SSL certificate.

[ Root CA ] (Trusted by browser)
    └── [ Intermediate CA ] (Provided by your server)
          └── [ Your Domain Certificate ] (Provided by your server)

When a web browser connects to https://example.com, your server sends its SSL certificate and the required intermediate certificates. The browser takes your certificate, verifies it was signed by the intermediate, then verifies the intermediate was signed by the root. If your server fails to send the intermediate certificate, the browser's trust evaluation halts because it cannot bridge your domain to a trusted root.

Step 1: Diagnose the Chain Error

Before changing server configurations, you need to see exactly what your server is presenting to the outside world. Command-line tools and web-based diagnostics can reveal broken chains instantly.

Using OpenSSL to Inspect the Chain

You can query your server directly using the OpenSSL client command. Replace example.com with your actual domain name:

openssl s_client -connect example.com:443 -servername example.com
voices

Examine the output in the Certificate chain section. A healthy server output looks like this:

Certificate chain
 0 s:CN = example.com
   i:C = US, O = Let's Encrypt, CN = R3
 1 s:C = US, O = Let's Encrypt, CN = R3
   i:O = Digital Signature Trust Co., CN = DST Root CA X3

If you only see certificate index 0 and no index 1 or higher, your server is failing to serve intermediate certificates.

Using cURL for Quick Verification

You can also use curl to test if the certificate chain validates successfully against the local trust store:

curl -Iv https://example.com

If the chain is broken, you will see an immediate SSL handshake error:

* SSL certificate problem: unable to get local issuer certificate
* Closing connection
* SSL peer certificate verify error: 21 (unable to get local issuer certificate)

Step 2: Fix Missing Intermediates on Your Web Server

Once you confirm the intermediate certificate is missing from your server response, you must download the correct bundle from your Certificate Authority and configure your web server to serve it.

Nginx Configuration

Nginx requires you to combine your primary domain certificate and your intermediate certificate(s) into a single file, often called a fullchain.crt.

  1. Open your text editor and arrange your certificates in this exact order:
    • Your domain certificate (example.com.crt)
    • The intermediate certificate(s) (intermediate.crt)
  2. Save the combined file to your server:
-----BEGIN CERTIFICATE-----
[Your Domain Certificate]
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
[Intermediate Certificate]
-----END CERTIFICATE-----
  1. Update your Nginx configuration file (usually located in /etc/nginx/sites-available/ or /etc/nginx/conf.d/):
server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate /path/to/fullchain.crt;
    ssl_certificate_key /path/to/example.key;

    # Modern SSL configuration parameters
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
}
  1. Test the configuration and reload Nginx:
sudo nginx -t
sudo systemctl reload nginx

Apache Configuration

Apache uses separate directives for the domain certificate, the private key, and the intermediate certificate chain.

  1. Open your Apache Virtual Host configuration file (often found in /etc/httpd/conf.d/ or /etc/apache2/sites-available/).
  2. Update the SSL directives to explicitly point to your intermediate file:
<VirtualHost 192.0.2.1:443>
    ServerName example.com
    
    SSLEngine on
    SSLCertificateFile /path/to/example.com.crt
    SSLCertificateKeyFile /path/to/example.key
    SSLCertificateChainFile /path/to/intermediate.crt

    # Note: For Apache 2.4.8 and newer, SSLCertificateChainFile is deprecated.
    # Combine your domain cert and intermediate cert into SSLCertificateFile instead.
</VirtualHost>
  1. Test the syntax and restart Apache:
sudo apachectl configtest
sudo systemctl restart apache2

Windows Server (IIS)

Internet Information Services manages certificates through the Windows Certificate Store, which can occasionally mishandle intermediate certificates if they were not imported into the correct store.

  1. Open the Microsoft Management Console (MMC) by typing mmc in the Windows Run prompt.
  2. Add the Certificates snap-in and select Computer account.
  3. Navigate to Certificates (Local Computer) > Personal > Certificates.
  4. Right-click your SSL certificate, select All Tasks > Export, and follow the wizard to back up your certificate.
  5. If your intermediate certificate is missing from the Intermediate Certification Authorities > Certificates folder, right-click the folder, select All Tasks > Import, and import the intermediate bundle provided by your CA.
  6. Bind the renewed or corrected certificate to your HTTPS site in the IIS Manager bindings panel.

Comparison of Common SSL Errors

Error Type Likely Cause Resolution
NET::ERR_CERT_AUTHORITY_INVALID Missing intermediate certificate or untrusted root. Add the intermediate certificate bundle to your web server config.
ERR_CERT_DATE_INVALID Certificate has expired or system clock is wrong. Renew the SSL certificate and restart the web server service.
ERR_CERT_COMMON_NAME_INVALID Domain name does not match SAN/CN in cert. Reissue the certificate with correct domain names or wildcards.
SSL Handshake Failure Incompatible cipher suites or TLS protocol mismatch. Update ssl_protocols and cipher suite configurations in your server block.

Common Mistakes and How to Fix Them

Even experienced engineers occasionally trip over subtle configuration mistakes when managing TLS certificates. Avoid these common pitfalls:

  • Putting the Root Certificate in the Chain: Some administrators mistakenly append the self-signed root certificate to their intermediate bundle. Root certificates should never be served by your web server; clients already have them locally. Serving roots can bloat the TLS handshake and cause issues on strict clients.
  • Reversed Intermediate Order: If your CA provides multiple intermediate certificates (e.g., a cross-sign and a primary intermediate), their ordering matters. The intermediate that signs your domain certificate must come first, followed by any higher-level intermediates.
  • Failing to Restart Services: Editing configuration files is not enough. You must explicitly reload or restart your web server daemon (nginx, apache2, httpd, or iisreset) for the new certificate chain to take effect.
  • Stale CDN or Load Balancer Caches: If you sit behind a Content Delivery Network (Cloudflare, AWS CloudFront, Fastly) or a reverse proxy (HAProxy, Nginx load balancer), updating the certificate on your origin server will not fix the chain if the edge node is caching an old certificate bundle. Update the certificate inside the CDN dashboard or load balancer as well.

SSL Chain Troubleshooting Checklist

Review this quick list before deploying or updating production certificates:

  • Downloaded the exact intermediate bundle corresponding to your specific CA and issuance date.
  • Combined domain certificate and intermediate certificates in the correct top-down order.
  • Updated web server configuration files (nginx.conf, httpd virtual hosts, or IIS bindings).
  • Tested syntax using native server testing tools (nginx -t, apachectl configtest).
  • Restarted or reloaded the web server service.
  • Verified the complete chain using command-line tools or a web-based SSL verification utility.

Frequently asked questions

What is an intermediate certificate and why is it required?

An intermediate certificate acts as a trusted bridge between your website's end-entity SSL certificate and a pre-installed root certificate authority. Root certificates are kept highly secure and rarely sign website certificates directly, so they delegate trust to intermediate certificates. Browsers require these intermediates to verify that your certificate traces back to a trusted root.

Why do some browsers load my site fine while others show a security warning?

Browsers handle certificate caching and trust stores differently. A browser or device that has previously visited your site might have cached the intermediate certificate locally, allowing it to load without errors. A fresh browser installation or a mobile device lacking that cached intermediate will fail instantly if your server does not explicitly provide it during the handshake.

Should I include the root certificate in my fullchain file?

No, you should never include the root certificate in your server's certificate chain file. Root certificates are already embedded in the operating system and browser trust stores. Including them is unnecessary, increases handshake packet size, and can occasionally trigger validation errors on stricter client platforms.

How do I know if my intermediate certificate has expired?

You can check your certificate expiration dates using OpenSSL command-line tools or by running your domain through an online SSL analysis tool. Both your domain certificate and your intermediate certificates have distinct validity periods, and if an intermediate expires, the trust chain will break until your CA issues a replacement.

What should I do if my CDN is caching an old certificate chain?

If you use a CDN or reverse proxy in front of your origin server, updating the certificate on your backend server is only half the battle. You must upload the new certificate and complete intermediate bundle directly into your CDN dashboard's SSL/TLS management section and manually purge your CDN cache.

Related articles

Free tools