Broken Certificate Chain: Validation & Error Fixes
How to read the exact chain error a browser, curl, Java, or Android is showing you, work out which of a handful of specific causes is actually behind it, and fix it on nginx, Apache, or IIS — without guessing.
A Broken Chain Is a Symptom, Not a Single Problem
"Certificate chain error" covers a handful of genuinely distinct underlying causes that all produce roughly the same scary browser warning or failed connection — a missing intermediate, certificates pasted in the wrong order, an expired link partway up the chain, or a leaf certificate that doesn't actually match the private key it's paired with. Treating all of these as one problem and randomly trying fixes wastes time; the fast path is reading the specific error message your client actually gave you, since different clients report genuinely different failure signatures for genuinely different root causes.
openssl s_client -connect host:443 -showcerts < /dev/null before touching any configuration. This shows exactly what the server currently sends, which is the only thing that matters — not what your browser has cached, and not what the CA's documentation claims should be there.Reading the Error Your Client Actually Gave You
The Most Common Cause: A Missing Intermediate
By a wide margin, the majority of real-world "broken chain" reports trace back to a server sending only its leaf certificate, with no intermediate at all. This happens when whoever configured the web server used only the single certificate file a CA's dashboard displayed most prominently, missing a separate intermediate bundle the CA also provided (often under a name like "intermediate.crt," "ca-bundle.crt," or referenced only in less-visible setup documentation). The fix is always the same regardless of server software: locate the correct intermediate for your specific certificate, and ensure it's actually included wherever your server's configuration expects a full chain.
Wrong Order in the Chain File
Less common than a missing certificate but just as effective at breaking validation on strict clients: certificates concatenated in the wrong sequence. Servers are expected to send the leaf first, then intermediates climbing toward (but not including) the root. A file built by pasting the intermediate before the leaf, or intermediates out of their actual signing order, can contain every certificate needed for a valid chain while still failing, since some clients build the chain strictly in the order received rather than reassembling it by matching issuer/subject names themselves.
An Expired Intermediate — Yes, Those Expire Too
It's easy to monitor a leaf certificate's expiry closely while forgetting the intermediate above it has its own, entirely separate validity window. When an intermediate lapses, every leaf certificate it signed fails chain validation immediately, regardless of how much time is left on the leaf's own certificate. This failure mode is particularly disorienting because nothing about the server's own certificate or configuration changed — the break originates entirely from the CA's own intermediate rotation schedule, discoverable only by actually decoding the intermediate's validity dates rather than assuming it's a permanent fixture.
A Chain Built From the Wrong Certificate
A structurally complete, correctly ordered, unexpired chain can still fail for a reason that has nothing to do with the chain itself: the leaf certificate doesn't actually match the private key the server is configured to use, typically from an old certificate/key pair being left in place after a renewal replaced only one of the two files. This produces a different class of error than a chain-validation failure (usually a handshake failure rather than a certificate-authority warning), but gets reported anecdotally as "the SSL is broken" just as often, which is why confirming the leaf certificate and private key actually match — comparing their public keys, as covered in our companion guide on chain and PEM/DER mechanics — is worth doing early in any troubleshooting session.
Server-Specific Fixes
| Server | Where the Chain Lives | Common Mistake |
|---|---|---|
| nginx | Single file referenced by ssl_certificate: leaf + intermediate concatenated | Pointing ssl_certificate at the leaf-only file instead of a fullchain bundle |
| Apache (2.4.8+) | Intermediate appended directly into the file referenced by SSLCertificateFile | Still using the deprecated separate SSLCertificateChainFile directive incorrectly, or omitting it on older versions |
| IIS | Windows Intermediate Certification Authorities store, not a file | The intermediate was never imported into that Windows certificate store on the server |
Diagnosing the Exact Break With This Site's Tools
Pull the live chain with openssl s_client -connect yourdomain.com:443 -showcerts < /dev/null, copy every -----BEGIN CERTIFICATE----- block it prints, and paste the full set into the Certificate Chain Checker. It verifies each signature link cryptographically and names the specific broken link and reason, rather than the generic pass/fail a browser gives you — distinguishing a missing certificate, a name mismatch, or an actual signature failure from each other. For a single certificate in the chain, the Certificate Decoder confirms its validity dates and issuer independently, useful for isolating whether an intermediate has quietly expired.
A Systematic Order of Operations
When the cause isn't obvious, work through checks in this order rather than guessing: first, pull the exact chain the server currently sends and confirm how many certificates it actually contains — one certificate alone almost always means a missing intermediate. Second, decode each certificate's validity dates and confirm none has expired, intermediates included. Third, confirm the order is leaf-first and that each certificate's issuer matches the subject of the one following it — the Certificate Chain Checker automates exactly this step. Fourth, if everything above checks out, confirm the leaf certificate's public key actually matches the private key configured on the server, since a chain-level check alone won't catch a key mismatch.
Real Troubleshooting Scenarios
A team migrates a site to a new server and copies over what they believe is the full certificate but forgets the separate intermediate bundle file, producing curl and mobile-app failures that don't show up in casual browser testing since Chrome had the intermediate cached from the old server. A renewal script updates a leaf certificate automatically but doesn't refresh the bundled intermediate, and the chain silently breaks months later when that older intermediate expires on its own schedule, unrelated to the leaf's renewal date. An IIS administrator installs a new certificate through the server's GUI but the intermediate never gets imported into the correct Windows certificate store, producing chain errors specifically on non-Windows API clients hitting the same endpoint that IIS-aware Windows clients don't experience. A developer debugging a Java service's TLS failures traces it to the JVM's own bundled truststore predating a newer root the browsers on the same machine already have.
Related Reading
For the underlying mechanics of chain files, PEM concatenation, and format conversion, see our companion guide Certificate Chains & PEM vs DER Encoding. For how root and intermediate trust actually gets established in the first place, read Root CA & Intermediate Certificates Explained. To verify a chain's cryptographic signature links directly, use the Certificate Chain Checker. For decoding a single certificate's fields independently, use the Certificate Decoder.
ToolsNovaHub guides are researched against primary sources (RFCs, vendor docs) and kept up to date as standards change. Spotted an error? Let us know.
📋 Related Tools & Guides Comparison
| Resource | Type | Link |
|---|---|---|
| Certificate Chain Checker | Tool | Open Tool → |
| Certificate Decoder | Tool | Open Tool → |
| Certificate Chains & PEM vs DER Encoding | Guide | Read Guide → |
| Root CA & Intermediate Certificates Explained | Guide | Read Guide → |
| Verifying & Troubleshooting CSR Errors | Guide | Read Guide → |