Ctrl + K
Security19 min read

Certificate Chains Explained

Understand TLS certificate chains, root certificates, intermediate CAs, server certificates, trust stores, chain validation and common configuration problems.

Published: 2026-09-02

A certificate chain is a sequence of digital certificates that allows a client to verify the identity of a server and establish trust during a TLS connection. Instead of trusting every website certificate individually, browsers and operating systems use trusted root Certificate Authorities and validate the certificates that connect a server certificate back to one of those trusted roots.

Certificate chains are a fundamental part of HTTPS and TLS. Understanding how server certificates, intermediate certificates and root certificates work together makes it easier to diagnose errors such as incomplete certificate chains, unknown issuers and certificate verification failures.

What Is a Certificate Chain?

A certificate chain is a hierarchy of certificates where each certificate is signed by the certificate authority represented by the next certificate in the chain. At the top of the trust hierarchy is a trusted root CA. At the bottom is the server certificate presented by the website or service.

Root CA
   ↓ signs
Intermediate CA
   ↓ signs
Server Certificate

The server normally sends its own certificate together with the necessary intermediate certificates. The client already has a collection of trusted root certificates in its trust store and uses them to complete and validate the chain.

The Three Main Parts of a Certificate Chain

CertificateRoleUsually Sent by Server?
Server certificateIdentifies the website or serviceYes
Intermediate CALinks the server certificate to a trusted rootYes
Root CAProvides the trust anchorUsually no

Server Certificate

The server certificate is the certificate associated with the website or service being accessed. It contains the server's public key, identity information, validity period, certificate issuer and extensions such as Subject Alternative Name.

When a browser connects to https://example.com, the server presents a certificate that is intended to prove that the public key belongs to the requested hostname and that the certificate was issued by a trusted authority.

Intermediate Certificates

Intermediate certificates sit between the server certificate and the root CA. They allow a root CA to delegate certificate issuance to separate intermediate authorities without using the root private key for every certificate issued to websites.

Trusted Root CA
       │
       ▼
Intermediate CA
       │
       ▼
example.com

Intermediate CAs are important because the root CA can remain highly protected while intermediate CAs handle routine certificate issuance. If an intermediate CA is compromised or needs to be revoked, the CA ecosystem can manage that intermediate separately from the root.

Root Certificates

A root certificate belongs to a root Certificate Authority and serves as a trust anchor. Operating systems, browsers and other software maintain trust stores containing root certificates that they consider trusted.

A root certificate is generally self-signed. Its trust does not come from another certificate in the same chain. Instead, the operating system or application explicitly trusts the root certificate because it is included in its trusted root store.

💡 A root certificate is trusted because the client already trusts it. The root does not normally need to be sent by the web server as part of the TLS handshake.

Trust Anchors

A trust anchor is the certificate or public key that a validation system trusts without needing to establish trust through another certificate. In common TLS deployments, the root CA certificate acts as the trust anchor.

The client does not simply trust every certificate presented by a server. Instead, it attempts to build a valid certification path from the server certificate to a trusted root contained in its trust store.

How Certificate Chain Validation Works

During TLS certificate validation, the client examines the certificates and verifies their signatures, validity periods, names, key usage and other relevant constraints. It also checks whether the chain leads to an acceptable trust anchor.

Server certificate
       ↓
Check issuer
       ↓
Find intermediate CA
       ↓
Verify intermediate signature
       ↓
Find trusted root
       ↓
Verify chain
       ↓
Check hostname and certificate constraints
       ↓
Certificate accepted

Certificate Signatures in a Chain

Each certificate contains a digital signature created by its issuer. The issuer's public key can be used to verify that signature. This creates a cryptographic relationship between certificates in the chain.

CertificateSigned By
Server certificateIntermediate CA
Intermediate certificateRoot CA or another intermediate CA
Root certificateUsually self-signed

The signature relationship is only one part of validation. A valid signature does not automatically make a certificate trusted. The client must also verify certificate constraints, identity, validity and the chain's relationship to a trusted root.

Why Servers Usually Send Intermediate Certificates

A client cannot necessarily build a certificate chain if the server sends only its leaf certificate. The client may already have the root CA but not the required intermediate CA. Providing the intermediate certificates allows the client to construct the complete path to the trusted root.

⚠️ Do not assume that clients always have the intermediate certificate cached. A server should normally provide the intermediate certificates required to build its intended certificate chain.

Why the Root Certificate Is Usually Not Sent

Sending the root certificate is normally unnecessary because the client is expected to already have trusted root certificates in its trust store. The server generally sends its certificate followed by the intermediate certificates needed to connect it to the trust anchor.

Typical server certificate bundle:

-----BEGIN CERTIFICATE-----
Server certificate
-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----
Intermediate CA certificate
-----END CERTIFICATE-----

What Is a Trust Store?

A trust store is a collection of trusted certificates or trust anchors maintained by an operating system, browser, runtime or application. Different environments can have different trust stores and therefore different sets of trusted root CAs.

EnvironmentPossible Trust Store
Operating systemSystem certificate store
Web browserBrowser-managed or system-integrated trust store
Java applicationJava truststore
Node.js applicationRuntime and system certificate configuration
ContainerCertificates installed inside the container

This explains why a certificate can appear trusted on one machine but fail validation on another. The environments may use different trust stores, certificate policies or software versions.

Certificate Chain Example

Consider a website with the following chain. The website certificate is issued by an intermediate CA, and that intermediate is issued by a trusted root CA.

Root CA
  Subject: Example Root CA
       │
       │ signs
       ▼
Intermediate CA
  Subject: Example TLS Intermediate
       │
       │ signs
       ▼
Server Certificate
  Subject: example.com
  SAN: example.com, www.example.com

When a browser receives the server certificate and intermediate certificate, it can verify the server certificate using the intermediate public key and then verify the intermediate using the trusted root. If all other certificate checks succeed, the chain can be trusted.

Certificate Chain vs Certificate Bundle

The terms certificate chain and certificate bundle are related but are not exactly the same. A chain describes the logical certification path, while a bundle usually refers to a file containing multiple certificates.

TermMeaning
Certificate chainLogical trust relationship between certificates
Certificate bundleFile containing multiple certificates
Trust storeCollection of certificates trusted by a client
Root CATrust anchor at the top of a common chain

Full Chain vs Certificate Chain

In server configuration, the phrase full chain usually means the server certificate together with the intermediate certificates required by clients to construct the certification path to a trusted root.

The exact file naming differs between web servers, hosting providers and certificate authorities. Some systems use terms such as fullchain.pem, chain.pem or bundle.pem.

Common PEM Chain Format

-----BEGIN CERTIFICATE-----
Server certificate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
Intermediate certificate
-----END CERTIFICATE-----

When multiple PEM certificates are placed into one file, their order can matter for software configuration. A common server configuration places the server certificate first and the intermediate certificates afterward.

Why Certificate Order Matters

Some TLS servers and certificate-management systems expect the leaf certificate to appear before its issuing intermediates. Incorrect ordering can cause configuration errors or prevent clients from constructing the intended chain.

💡 When configuring a TLS server with a PEM bundle, follow the documentation for your server software and certificate provider. Do not assume that every application interprets certificate bundles in exactly the same way.

Incomplete Certificate Chains

An incomplete chain occurs when a server does not provide an intermediate certificate required to connect its server certificate to a trusted root. The result can be a certificate verification error even though the certificate itself is valid and correctly issued.

Server sends:
  Server certificate

Client has:
  Root CA

Missing:
  Intermediate CA

Result:
  Chain cannot be built reliably
⚠️ A certificate appearing valid in a browser does not always mean the server is configured correctly. Clients can sometimes obtain missing intermediates through caching or other mechanisms, while other clients may fail.

Common Certificate Chain Errors

ErrorPossible Cause
Unable to get local issuer certificateMissing or unavailable issuer certificate
Certificate verify failedChain or certificate validation failure
Unknown issuerIssuer cannot be connected to a trusted root
Incomplete chainServer did not provide required intermediate
Hostname mismatchCertificate does not cover requested hostname
Expired certificateCertificate is outside its validity period

Unknown Certificate Authority

An unknown authority error commonly means that the client cannot establish a trusted path from the server certificate to a trusted root. This can happen because the server sent an incomplete chain, the root is not trusted by the client or a private CA is being used without installing its trust anchor.

Private Certificate Authorities

Organizations can operate private certificate authorities for internal applications, development environments and corporate services. These certificates are not automatically trusted by public browsers and operating systems. Clients must explicitly trust the organization's root CA.

Private Root CA
      ↓
Internal Intermediate CA
      ↓
internal.example.com

Private PKI systems are useful when an organization controls the client devices and needs certificates for internal services. However, the trust infrastructure must be distributed and managed correctly across all clients.

Cross-Signed Certificates

Certificate authorities can sometimes use cross-signing to create multiple paths from an intermediate or root authority to trusted roots. This can help provide compatibility with systems that trust one root but not another.

As a result, a certificate can potentially have more than one valid certification path. Different clients may build different paths depending on their available trust anchors, certificate stores and path-building algorithms.

Certificate Chain Building

Clients do not always simply read the certificates in the order they are received and accept them. Certificate path building can involve locating issuer certificates, checking signatures, evaluating constraints and selecting a valid path toward a trusted trust anchor.

Leaf certificate
      ↓
Find issuer
      ↓
Verify issuer
      ↓
Find next issuer
      ↓
Check constraints
      ↓
Reach trusted root
      ↓
Validate path

Certificate Chain Constraints

Certificates can contain extensions that restrict how they may be used. Basic Constraints can indicate whether a certificate is allowed to act as a CA, while Key Usage and Extended Key Usage can restrict cryptographic and application purposes.

ExtensionPurpose
Basic ConstraintsIdentifies CA certificates and path constraints
Key UsageDefines permitted cryptographic operations
Extended Key UsageDefines application-specific purposes
Subject Alternative NameIdentifies DNS names and other identities

Basic Constraints and CA Certificates

A certificate intended to issue other certificates must be authorized to act as a CA. The Basic Constraints extension is used to identify CA certificates and can also contain path length constraints.

Basic Constraints:
  CA:TRUE

A normal server certificate should not be treated as a CA certificate. This distinction is important because allowing arbitrary certificates to issue other certificates would undermine the trust model.

Certificate Chain and Hostname Validation

A valid certificate chain is not enough for HTTPS. The client must also verify that the certificate identifies the hostname being accessed. This is typically checked against the Subject Alternative Name extension.

Requested host:
api.example.com

Certificate SAN:
DNS:example.com
DNS:www.example.com

Result:
Hostname mismatch

This is why certificate validation combines several checks rather than relying solely on whether the issuer is trusted.

Certificate Validity Periods

Every certificate in a chain has a validity period. A client can reject a certificate if it is not yet valid or has expired. Depending on the validation implementation, the validity of the entire certification path must be considered.

CheckQuestion
Not BeforeIs the certificate currently valid?
Not AfterHas the certificate expired?
IssuerWas it issued by the expected authority?
SignatureIs the issuer signature valid?
HostnameDoes the certificate cover the requested host?

How to Inspect a Certificate Chain

OpenSSL can be used to inspect certificates and test TLS connections. For example, the s_client command can display the certificates provided by a TLS server.

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

The output can be used to inspect the certificates presented by the server, including their subjects and issuers. Additional OpenSSL options can be used to perform more specific verification tests.

Verifying a Chain with OpenSSL

When testing a certificate chain manually, OpenSSL can verify a certificate against a supplied chain and trust store. The exact command depends on how the certificate files are organized and which trust anchors are being used.

openssl verify -CAfile root.pem -untrusted intermediate.pem server.pem

Here, root.pem represents the trusted root, intermediate.pem contains the intermediate certificate and server.pem is the certificate being validated. The command illustrates the relationship between the trust anchor, intermediate chain and leaf certificate.

Certificate Chain and TLS Handshake

The certificate chain is used as part of the authentication process during a TLS connection. The server presents its certificate information, and the client validates the certificate path before relying on the server's authenticated public key.

Client
  │
  │ TLS connection
  ▼
Server
  │
  ├── Server certificate
  └── Intermediate certificate(s)
  │
  ▼
Client builds chain
  │
  ▼
Trusted root
  │
  ▼
Certificate accepted

Certificate Chains and Browsers

Modern browsers perform extensive certificate validation automatically. When a user opens an HTTPS website, the browser evaluates the server certificate, certificate chain, hostname, validity period and applicable security policies.

This automation means developers rarely need to inspect chains manually during normal browsing. However, understanding the chain becomes especially useful when deploying servers, configuring reverse proxies, debugging TLS errors or operating private PKI infrastructure.

Certificate Chains in Reverse Proxies

Reverse proxies, load balancers and web servers terminate TLS connections and therefore need access to the correct server certificate and private key. Depending on the software, the configuration may also require a full certificate chain containing the intermediate certificates.

A common deployment mistake is installing only the leaf certificate while omitting the intermediate chain. This can cause some clients to report trust errors even though the same website appears to work from other environments.

Common Certificate Chain Mistakes

  • Installing only the server certificate.
  • Sending the wrong intermediate certificate.
  • Using certificates in the wrong order.
  • Including an unnecessary root certificate in the server bundle.
  • Using an expired intermediate certificate.
  • Using a private CA without distributing its trust root.
  • Configuring a certificate for the wrong hostname.
  • Mixing certificates from different certificate chains.
  • Failing to test the deployment from multiple clients.
  • Assuming that one browser's result represents every client.

Best Practices for Certificate Chains

  • Install the server certificate and required intermediate certificates.
  • Follow the certificate authority's recommended chain configuration.
  • Do not normally send the trusted root certificate from the server.
  • Verify the chain after every TLS configuration change.
  • Check certificate expiration dates regularly.
  • Confirm that SAN entries match the production hostnames.
  • Keep private keys separate from public certificate bundles.
  • Test TLS deployments from different operating systems and clients.
  • Replace compromised or deprecated certificates promptly.
  • Document which certificates belong to each production service.

Troubleshooting Certificate Chain Problems

When a TLS connection fails with a certificate error, start by inspecting the certificate presented by the server. Check the subject, issuer, expiration date and SAN entries. Then determine whether the server provides the necessary intermediate certificates.

1. Check server certificate
2. Check hostname
3. Check expiration
4. Check issuer
5. Check intermediate certificates
6. Check trusted root
7. Verify the complete chain
8. Test from another client

If the chain works on one machine but fails on another, compare the trust stores and software environments. The problem may not be the server certificate itself; the clients may have different trusted roots or certificate-validation behavior.

Certificate Chain vs Trust Chain

The terms certificate chain and trust chain are often used interchangeably, but they describe slightly different concepts. A certificate chain describes the certificates and signatures connecting the leaf to an issuer hierarchy. A trust chain emphasizes how that path ultimately reaches a certificate that the client already trusts.

Frequently Asked Questions

What is a certificate chain?

A certificate chain is a sequence of certificates that connects a server certificate to a trusted root CA through one or more intermediate certificate authorities.

What is the difference between a root and intermediate CA?

A root CA is normally a trusted trust anchor stored in a client's trust store. An intermediate CA is signed by a root or another CA and is used to issue certificates without requiring the root private key to sign every server certificate.

Does a server need to send the root certificate?

Normally no. Clients are expected to have trusted root certificates in their trust stores. Servers generally send the server certificate and the required intermediate certificates.

What is a full certificate chain?

In common server configuration terminology, a full chain usually means the server certificate together with the intermediate certificates needed to connect it to a trusted root.

Why does my certificate work in one browser but not another?

Different clients can have different trust stores, cached intermediate certificates and certificate-validation behavior. An incomplete server chain can therefore work in one environment and fail in another.

Why is my certificate chain incomplete?

The most common reason is that the server sends its leaf certificate but does not provide one or more required intermediate certificates. The client may then be unable to build a path to a trusted root.

Can a certificate chain contain multiple intermediate certificates?

Yes. A certification path can contain multiple intermediate CAs between the server certificate and the trusted root.

Does a valid certificate always mean HTTPS will work?

No. The client must also validate the hostname, certificate validity period, chain, key usage and other applicable requirements. A certificate can be cryptographically valid but still fail hostname or trust validation.

Should I include the root certificate in fullchain.pem?

Usually the server should provide the leaf certificate and required intermediates rather than the root. Follow the documentation of your web server and certificate authority for the exact expected bundle.

How can I inspect a certificate chain?

You can inspect the certificates using OpenSSL commands such as openssl s_client or use a certificate chain viewer to display the certificates, issuers and relationships in a more readable format.

Helpful Certificate Tools

A Certificate Chain Viewer helps inspect certificate hierarchies and identify relationships between server, intermediate and root certificates. A PEM Certificate Viewer displays detailed information from PEM-encoded certificates, a Certificate Expiration Checker helps monitor certificate validity periods, a TLS Version Checker checks supported TLS protocol versions, and a CSR Decoder helps inspect Certificate Signing Requests before certificate issuance.

Conclusion

Certificate chains provide the structure that allows TLS clients to connect a server certificate to a trusted Certificate Authority. The server certificate identifies the website, intermediate certificates connect it to the issuing hierarchy and a trusted root acts as the trust anchor already recognized by the client.

Correct certificate-chain configuration is essential for reliable HTTPS. Servers should normally provide the leaf certificate and required intermediate certificates, while clients provide the trusted root. When troubleshooting TLS errors, inspect the entire path rather than looking only at the server certificate. Checking the issuer, SAN, expiration, signatures, intermediate certificates and trust store can quickly reveal why a certificate chain fails validation.

Found an issue?

Found an error, outdated information, or something missing from this article? Let me know through the Contact page.

Your feedback helps improve our articles and keep them accurate and useful.