Home >Blog

SSL Certificate Chain Explained (with Real Examples)

Published Updated

An SSL certificate chain is the trust path a client uses to decide whether a server certificate is acceptable. The leaf certificate names your hostname. An intermediate certificate links that leaf to a certificate authority root. The root is normally already trusted by the client, so the server usually sends the leaf and intermediate certificates, not the root.

Chain problems are often configuration problems rather than certificate-signing problems. A valid leaf can still produce a warning when the intermediate is missing, the order is wrong, or the server sends a certificate for a different hostname. This guide shows how to read the pieces and test the live endpoint.

The three roles

  • Leaf certificate: the certificate whose subject or SAN contains the hostname a client requested.
  • Intermediate CA: the certificate that signed the leaf and provides a path toward a trusted root.
  • Root CA: a trust anchor stored in the browser, operating system, runtime, or device trust store.
Educational diagram of a leaf SSL certificate linked to an intermediate and root CA

Read the order before you edit the file

  1. Start with the live endpoint. Use the real hostname and port. A certificate file on disk may be correct while the web server still serves an older or incomplete bundle.
  2. Show every certificate. Run OpenSSL with -showcerts so the server response includes the certificates it actually sends.
  3. Compare subject and issuer. The issuer of the leaf should correspond to the subject of the next certificate in the path. Repeat the relationship until the client reaches a trusted root.
  4. Check the hostname. Read the Subject Alternative Name field. Common Name alone is not enough for modern hostname validation.
  5. Read the verification result. A successful handshake is not the same as a trusted chain. Look for the verify return code and the specific reason if verification fails.
  6. Fix the server bundle. Place the leaf first, followed by the required intermediates. Do not blindly append every certificate from a download page.
openssl s_client -connect example.com:443 -servername example.com -showcerts 

A real inspection checklist

For a live site, record the hostname, the leaf expiry, the SAN entries, the issuer, and the verification result. Then repeat the request from a second client or environment if the problem appears device-specific. A browser may have an intermediate cached from an earlier visit; a clean runtime will expose what the server actually sends.

When you have a PEM block rather than a live endpoint, paste it into the SSL Certificate Decoder to inspect its subject, issuer, validity, SAN, fingerprint, and signature algorithm. That is a file-level check, so pair it with the live OpenSSL command when debugging deployment.

Questions people usually ask

What is an SSL certificate chain?
Read the live chain and compare each certificate's subject and issuer.

Does the server send the root certificate?
Read the live chain and compare each certificate's subject and issuer.

Why does a browser accept a chain that a script rejects?
Read the live chain and compare each certificate's subject and issuer.

How can I inspect the chain with OpenSSL?
Read the live chain and compare each certificate's subject and issuer.

What does an incomplete chain look like?
Read the live chain and compare each certificate's subject and issuer.

Where can I decode a PEM certificate?
Read the live chain and compare each certificate's subject and issuer.

The shortest path to a reliable fix is evidence from the deployed endpoint: the exact chain, the exact hostname, and the exact verification error. Once those agree, the configuration change is usually small.

FAQ

What is an SSL certificate chain?
It is the sequence that lets a client build trust from the certificate for a hostname through one or more intermediate certificates to a trusted root.
Does the server send the root certificate?
Usually the server sends the leaf and intermediate certificates. Clients already carry trusted roots, so sending the root is unnecessary and can create a noisy configuration.
Why does a browser accept a chain that a script rejects?
The browser may have cached or fetched an intermediate, while a script or older client may rely only on what the server sends. Test the deployed chain, not just a local certificate file.
How can I inspect the chain with OpenSSL?
Use openssl s_client with -showcerts and -servername, then read the certificate subjects, issuers, and verification result. A successful TCP connection alone proves very little.
What does an incomplete chain look like?
The leaf may be valid and the hostname may match, but the client cannot build a path to a trusted root. Different clients then show different warnings.
Where can I decode a PEM certificate?
SSL Certificate Decoder can show fields from pasted certificate content, while OpenSSL remains useful for checking the live server connection and sent chain.

Table of Contents

Information

  • Hits60
  • Published date2026/10/07

More Posts

Explore more articles from this section
How to Decode an SSL Certificate Online
Aug 24, 202697views

How to Decode an SSL Certificate Online

Learn how to decode an SSL certificate online by pasting PEM text or uploading a certificate, then review the ...

#ssl certificate#certificate decoder#PEM#TLS
X.509 Certificate Decoder: How to Read an X.509 Certificate
Sep 02, 202683views

X.509 Certificate Decoder: How to Read an X.509 Certificate

A practical guide to using SSL Certificate Decoder to inspect a public PEM certificate and understand its X.50...

#x509 certificate decoder#X.509 certificate#SSL certificate decoder#PEM
How to Decode a PEM Certificate Online with SSL Certificate Decoder
Aug 30, 202680views

How to Decode a PEM Certificate Online with SSL Certificate Decoder

Learn how PEM boundary markers work and how to decode a public PEM certificate by pasting it or uploading a PE...

#pem certificate decoder#PEM certificate#BEGIN CERTIFICATE#END CERTIFICATE
How to Read SSL Certificate Details: A Practical Guide to Subject, Issuer, CN, SAN, and Fingerprints
Aug 27, 202678views

How to Read SSL Certificate Details: A Practical Guide to Subject, Issuer, CN, SAN, and Fingerprints

Learn how to use SSL Certificate Decoder to inspect a public certificate and understand Subject, Issuer, Commo...

#SSL certificate#certificate details#Subject#Issuer
Fix "PEM Certificate Is Invalid" Error: Common Causes and Solutions
Sep 30, 202677views

Fix "PEM Certificate Is Invalid" Error: Common Causes and Solutions

Why PEM certificates fail to load, the five common causes, and the exact OpenSSL commands to fix each one.

#pem certificate invalid#openssl pem#fix pem error
When Parsing an SSL Certificate I Get 'PEM Certificate Is Invalid or Unrecognized' – What Does It Mean and How Do I Fix It?
Oct 11, 202669views

When Parsing an SSL Certificate I Get 'PEM Certificate Is Invalid or Unrecognized' – What Does It Mean and How Do I Fix It?

The parser could not find a valid PEM block. Nine times out of ten the file is fine and the copy is broken — m...

#pem certificate invalid#ssl certificate parse error#openssl x509#der vs pem
Feedback email