How TLS Certificate Chains Work

When a browser connects to a site over TLS, the server presents a certificate for that endpoint and usually one or more issuer certificates. The browser then tries to connect the endpoint certificate to a trust anchor it already accepts. The certificates offered by the server are its certificate chain; the client's certification path may also use certificates from other sources. The leaf identifies the service's public key, intermediates identify certificate authorities allowed to issue certificates, and the trust anchor provides the public key from which validation begins.
A chain is not trustworthy merely because certificates are placed in a file in a plausible order. The client must validate signatures and constraints, recognize the trust anchor, and apply its own application policy. A missing intermediate can cause a warning on one device but not another, and sending an unknown root does not make every client trust it.
Start with the End-Entity Certificate and Its Issuer
The certificate presented for a website is the end-entity or leaf certificate. It contains the service public key and names the issuer that signed it. The matching private key must remain secret and is not part of the certificate sent to the client. The certificate authority that issued the leaf may be an intermediate rather than a root. An intermediate certificate carries a CA public key and authorization to sign certificates, subject to the constraints in that certificate.
To build a path, a client looks for the issuer of the leaf certificate and uses that issuer's public key to check the leaf's signature. It repeats this process through any further intermediates. Name and key identifiers can help select candidates, but an issuer name alone is not proof: signatures and certificate restrictions still have to pass. A certificate marked as a CA must also be permitted to act as one for the relevant step.
A simplified path connects a website's leaf certificate to an issuing intermediate and then to a trusted root. The path can contain more than one intermediate. The chain provided during a TLS handshake gives the client candidates for that path; the client may also have cached intermediates or obtain them by other means, depending on its implementation.
Understand the Trust Anchor
A trust anchor is information the client accepts before this handshake, commonly a root CA public key supplied by its operating system or browser trust program. Path validation takes that previously accepted trust anchor as an input. A root certificate often packages this information and is typically self-signed, but the act of receiving a root from a website does not make it trusted. The client's trust configuration decides that.
Different devices or applications can have different trust stores and policies. A path that ends at a trusted anchor on one device may end at an unrecognized anchor on another. This is why a server-side chain repair should normally supply the appropriate intermediates. Telling visitors to install an arbitrary root changes their trust decisions and is not the routine fix for an incomplete public website chain.
Know What the Server Should Send
For a public website, the TLS server normally sends the leaf certificate followed by the intermediate certificates needed to connect it to a recognized anchor. The trusted root is ordinarily already on the client. In an Nginx combined certificate file, place the server certificate before its intermediate issuers.
Order matters in server configuration because the service must pair its private key with the correct leaf certificate. A bundle beginning with an intermediate can make a server configuration invalid or cause the wrong chain to be offered. Use the chain format and certificate configuration expected by the server and platform. Keep the private key outside any public certificate bundle and restrict access to it.
A browser may appear to accept an incomplete server chain because it has previously cached the missing intermediate. A new device may lack it and fail validation. Check the certificates actually sent by the public TLS endpoint, including the selected hostname and server name indication, instead of relying only on a browser that has visited the site before.
Handle Missing Intermediates and Alternate Chains
A missing intermediate breaks the route from leaf to trust anchor unless the client can find that certificate elsewhere. The operator should obtain the correct issuer certificate from the issuing authority and configure the server to send it. Replacing it with an unrelated certificate that happens to share a similar name will not satisfy signature verification. A separate certificate chain issue can also arise when an intermediate has expired or is constrained in a way that disallows the path.
There may be more than one valid path. With cross-signing, certificates for the same intermediate CA public key are signed by different issuers and can lead to different roots. Which path a client builds depends on the chain offered, available certificates, its trust anchors, and its validation rules. A path useful for one client population might fail on devices that do not trust its ending anchor.
Self-issued and self-signed describe different properties. Self-issued means the issuer and subject name the same CA. Self-signed further requires that the certificate signature verify with the public key in that certificate. Thus, a self-issued certificate used during a CA key change is not automatically a self-signed root.
Check Why a Client Rejects the Chain
Path validation checks more than signatures. These checks can cover validity dates, CA authorization, name restrictions, and certificate policies. TLS clients also check that the endpoint name matches the leaf certificate and may apply revocation or other local rules. A path with valid signatures can still be rejected because a certificate expired, a CA was not authorized for a role, the endpoint name differs, or no trusted anchor is available.
When troubleshooting, separate these findings: what the server sent, what path the client built, which trust anchor it used, and which check failed. Inspect the chain at the public endpoint that visitors reach, since a CDN or load balancer may serve a different certificate and chain from the origin. Repair the missing or incorrect link at the responsible service, then confirm with clients that do not rely on a cached intermediate.







