What is an SSL certificate chain? How the chain of trust works

Installing an SSL certificate and having it flagged as “not secure” or “invalid” is a common issue for many. While there can be many reasons for this, one key problem can be an issue with the SSL certificate chain.  If you’ve been wondering what an SSL certificate chain is, you’ve come to the right place. Read on to learn how it works, how to check it, and how to fix it

What is an SSL certificate chain?

An SSL certificate chain is a set of certificates that links a purchased SSL certificate back to the issuing Certificate Authority’s (CA) root certificate, which is trusted by major web browsers. Each certificate is digitally signed by the certificate preceding it. If your site’s SSL is linked back to a trusted root certificate, web browsers will know to trust it and will allow it to load for visitors. 

A simple example of a chain of trust is: 

Website certificate (example.com) → intermediate CA → trusted root CA

It’s worth noting that real chains can vary and may sometimes include more intermediate certificates. 

The three types of certificates in a chain

Now that you have a better idea of what a certificate chain is, let’s take a closer look at the different certificate types within.

Root certificate 

We briefly described earlier that a root certificate is at the top of the chain and is associated with a trusted CA. Diving a little deeper into how it works, the root certificate is self-signed, which means it’s signed by its own private key. But self-signing alone doesn’t make a root trustworthy.

What does is being included in the root stores of browsers and operating systems from companies like Mozilla, Apple, and Google. SSL.com, the CA behind SSLs.com certificates, is one example. To become trusted,, CAs must meet the requirements of each company’s root program, including regular independent audits based on CA/Browser Forum guidelines.

Because root certificates are so important, their safety is paramount. If a root’s private key were compromised, attackers could create fake certificates that browsers trust. That’s why root private keys are usually kept offline in secure storage. But if the root is locked away, how do websites get their certificates? That’s where intermediates come in.

Intermediate certificate 

Intermediate certificates are created for the purpose of signing website SSL certificates in place of the root certificate. When they are created, they are signed by the root certificate, which stays offline. Unlike the root, the intermediate’s private key is kept online, but still stored securely.

This setup keeps the chain of trust as secure as possible. While the intermediate borrows trust from the root, if it is compromised, it can be revoked quickly, and a replacement created that will be signed by the same, untouched root. 

As we mentioned earlier, sometimes a chain has more than one intermediate certificate. CAs might use different intermediates for signing SSLs with different validation levels. Since intermediates generally aren’t stored in browsers’ root stores, your server has to supply the correct intermediate from your CA, which is where most chain problems begin.

Server certificate 

Also known as an end-entity certificate, this is the certificate that’s actually installed on the server and linked to your domain. It features the domain name it covers, validity dates, business name (if it’s an EV or OV certificate), and the intermediate certificate’s digital signature. The server certificate also comes with the related private key as well as the CA bundle, which contains the intermediate certificate(s). Both are also installed on the server. 

How does the chain of trust work?

Say someone tries to visit example.com via their browser. To connect, the server and browser go through a process known as the TLS handshake, part of which involves the browser checking whether or not the site’s SSL certificate is legitimate:

  1. The server sends the server certificate and the intermediate certificate from its CA bundle.
  2. The browser checks that the server certificate was signed by the intermediate sent from the server’s CA bundle. It then checks that the intermediate was signed by a root certificate in the browser’s own root store.
  3. The browser confirms that the server, intermediate, and root certificates are all within their validity dates. It also confirms that the domain matches the name on the server certificate, and that the server certificate is allowed to secure websites while the intermediate is permitted to sign certificates.
  4. If all checks pass, the browser will connect to the website’s server. If not, the browser will display a “not secure” warning.

What is an incomplete SSL certificate chain?

If the browser can’t build a complete path from the server certificate to the root certificate in its store, that is known as an incomplete certificate chain. This could be because the website owner forgot to install the CA bundle on the server, or an old or incorrect CA bundle was installed instead. 

Sometimes, the website owner might not even know there’s an issue with the certificate chain because some browsers can fill the gap. If the intermediate certificate is missing, they can either download the intermediate using a former server certificate or use a copy they’ve stored from a different site that uses the same intermediate. An error might only appear on other tools or older devices that can’t fill in the gap. 

Incomplete SSL certificate chains are actually quite a common problem. People install the server certificate but miss the CA bundle, see the site working in their own browser, and never notice that some visitors get errors.

Common SSL certificate chain errors


Here are some of the most common errors that can appear for users trying to connect to your site. Some error messages might have slightly different wording depending on where they show up.

Unable to get local issuer certificate

This can show up in command-line tools and code that use OpenSSL, such as curl, Git, and PHP. It could be caused by a server not sending the intermediate certificate, or the client having an outdated root store.

Unable to verify the first certificate

This mostly shows up in Node.js and other OpenSSL-based tools. “First certificate” refers to the server certificate. The client received it but couldn’t find the intermediate that signed it. The most likely culprit is a CA bundle that wasn’t installed.

Certificate authority invalid/not trusted

This generally shows up in browsers and is caused by the browser being unable to connect the server certificate to a root it trusts. This can happen due to a few things, such as a missing intermediate certificate, a self-signed certificate, a certificate from a private or internal CA that isn’t in public root stores, or a device with an outdated root store.

Expired intermediate or root certificate

The server certificate is valid, but a certificate further up the chain is invalid. This is often caused by an outdated CA bundle still being on the server from a previous SSL. 

Incorrect chain order or bundle configuration 

This can be caused by having an incorrect CA bundle on the server or the certificates in the bundle being in the wrong order. The server certificate should come first, followed by the intermediate that signed it. Many modern browsers can cope with the wrong order, but some stricter clients can’t.

How to check an SSL certificate chain

After installing a new server certificate, it’s always a good idea to check the SSL certificate chain to ensure everything is in working order and you don’t encounter any issues down the line. You always want to check the issuer, subject, validity dates, and the certificate path.

In your browser. 

The exact way to check this is slightly different, depending on your browser:

  • Chrome and Edge: Click the icon to the left of the address bar, select “Connection is secure,” then “Certificate is valid.” The certificate viewer opens, and the Details tab shows the certificate hierarchy.
  • Firefox: Click the icon to the left of the address bar, select “Connection secure,” then “More information,” then “View Certificate.” Each certificate in the chain gets its own tab.
  • Safari: Click the icon in the address bar, then “Show Certificate.” The hierarchy appears at the top.

As we’ve already mentioned, browsers can often fill in any CA bundle gaps if necessary. So to get a more accurate idea, use an online checker.

With an online checker 

The SSL Labs Server Test is an easy way to check for issues with your SSL. Just enter your domain and wait a minute or two. When it’s done, look for the “Chain issues” line in the certificate section. “None” means the chain is fine. Anything else, like “Incomplete,” flags a problem. [

With OpenSSL

Developers and system admins who want a more direct look can use OpenSSL via a terminal. Enter:

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

In the output, the “Certificate chain” section near the top lists the certificates the server sent. Certificate 0 is the server certificate, and certificate 1 is the intermediate. If only certificate 0 is listed, the intermediate is missing. Further down, “Verify return code: 0 (ok)” means the chain is fine. Any other number means there’s a problem. This command doesn’t check that your domain matches one listed in the server certificate, so it’s not a complete check.

How to fix an incomplete SSL certificate chain

If your SSL has an incomplete certificate chain, here’s what you need to do:

  1. Find out which intermediate you need by checking the issuer on your server certificate (either in-browser or SSL Labs). That tells you which CA and intermediate signed it.
  2. Get the CA bundle from your CA. It usually comes with your certificate, either in the issuance email, a downloaded zip file, or your account dashboard. Never download intermediate certificates from random third-party sites.
  3. Install it on the server. This will differ depending on your specific setup.  
  4. Restart or reload the server to see the changes take effect. If you use a hosting panel, it will usually handle this automatically.
  5. Retest with an online checker like SSL Labs to ensure everything is working. Check every server, load balancer, or CDN that handles HTTPS for the site, not just the main web server.

The takeaway

It isn’t enough to only install a valid SSL certificate. To avoid errors, it must always be accompanied by the relevant CA bundle containing an intermediate certificate that leads back to the trusted root certificate. As we’ve highlighted in this article, a missing intermediate certificate is one of the most common reasons an SSL is flagged as untrusted. 

So, every time you renew or get a new SSL, install all relevant files and check everything is working as it should with an SSL checker. 

Frequently asked questions

What is the purpose of an SSL certificate chain?
It links your website’s certificate to a root certificate that browsers already trust. That lets browsers confirm your certificate was issued by a legitimate CA and hasn’t been forged.

Is a root certificate the same as an intermediate certificate?
No. The root sits at the top of the chain, is stored in browsers’ and operating systems’ root stores, and is kept offline. The root signs the intermediate and handles the everyday job of signing website certificates.

Can an SSL certificate be valid but not trusted?
Yes. A certificate can be within its validity dates and cover the right domain, but if the browser can’t connect it to a trusted root, it will still show a warning. A missing intermediate is a common cause.

What happens if an intermediate certificate is missing?
Some browsers can fill the gap by downloading the intermediate or using a copy saved from another site, so your site may seem to work fine. Other browsers, devices, and apps can’t, so those visitors see an error.

What is a CA bundle?
A file from your CA containing the intermediate certificate (or certificates) that links your server certificate to a trusted root. You install it on your server alongside your certificate so the server can send it to browsers.

Share on Twitter, Facebook, Google+