Back to Articles
Troubleshooting2026-06-18•5 min read•CSR.plus Team

Incomplete Certificate Chain: Fix the Missing Intermediate

Incomplete Certificate Chain: Fix the Missing Intermediate

Incomplete Certificate Chain: How to Diagnose and Fix the Missing Intermediate (Nginx / Apache)

Direct answer: most "certificate chain errors" are not invalid certificates — the server simply sends the leaf without its intermediates. One command settles it: count the certificates returned with openssl s_client -showcerts; a single certificate means a broken chain. The fix is one concatenated file, leaf first, then intermediates: point Nginx ssl_certificate at it, or on Apache 2.4.8+ put the chain inside the SSLCertificateFile target. Do not send the root — clients already have it.

Core concepts

The three components

ComponentRoleShould the server send it?
Leaf (end-entity)Binds your hostnameYes
IntermediateLinks leaf to rootYes — missing means broken chain
RootThe client's trust anchorNo, already in the trust store

How the chain works

Clients trust roots directly. Your leaf is signed by an intermediate that is not in their trust store, so the server must send it during the handshake for the client to build leaf → intermediate → root. Why intermediates must be sent: clients only trust local roots; without intermediates no path can be built.

Why some clients work and others fail

Some clients cache intermediates or fetch the missing link via the AIA extension; others — older Android, Java/OpenJDK, curl, Node, monitoring agents — fail immediately. The server should never rely on client-side repair: AIA fetching is unreliable because it depends on client implementation and network reachability.

Order matters

Leaf first, then intermediates in signing order. Wrong order breaks some clients outright.

Let's Encrypt's current hierarchy

In practice an ECDSA leaf is served with an ECDSA intermediate, but cross-algorithm signing is valid X.509 — what must match is the issuer and signature, not the key type.

Fix it in 6 steps

Step 1 — See what the server actually sends

openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null

Count BEGIN CERTIFICATE blocks: 1 means leaf-only; 2 or more is healthy.

Step 2 — Read the verify code

openssl s_client -connect example.com:443 -servername example.com -verify_return_error </dev/null

Code 20 = issuer not found (missing intermediate); 21 = cannot verify the first certificate; 19 = self-signed.

Step 3 — Fetch the correct intermediate

Fetch the correct intermediate from your CA's chain bundle, or from the Authority Information Access extension of the leaf. Never mix generations — an ECDSA leaf needs an ECDSA intermediate. Certificate Decoder shows issuer and AIA instantly.

Step 4 — Concatenate (leaf first, no root)

cat leaf.crt intermediate.crt > fullchain.crt

Do not append the root: clients already have it in their local trust store.

Step 5 — Configure the server

Nginx: there are only ssl_certificate and ssl_certificate_key; no separate chain directive exists, so intermediates must live in the same file, leaf first.

ssl_certificate     /etc/ssl/certs/fullchain.crt;
ssl_certificate_key /etc/ssl/private/example.com.key;

Apache 2.4.8+: SSLCertificateChainFile was removed; put the chain into the file referenced by SSLCertificateFile.

Certbot users: cert.pem is leaf only (using it is the root cause of this bug), chain.pem is intermediates only, fullchain.pem is what you configure.

CDN: the CDN terminates TLS with its own certificate; uploading only the leaf forwards the same broken chain to visitors.

Step 6 — Verify

openssl verify -CAfile root.pem -untrusted intermediate.pem leaf.pem   # expect "leaf.pem: OK"

Then re-test externally with SSL Checker and from a clean browser profile.

Troubleshooting checklist

Symptom / codeMeaningFix
verify error:num=20 unable to get local issuer certificateMissing intermediate, or root absent locallyCheck how many certs the server sends
verify error:num=21 unable to verify the first certificateServer not sending intermediatesBuild fullchain and reload
verify error:num=19 self signed certificateSelf-signed cert in useSwitch to a publicly trusted certificate
Chrome NET::ERR_CERT_AUTHORITY_INVALIDPath building failedSame fix, then retest with cache cleared
Java PKIX path building failedTrustStore missing CA or intermediate not returnedSend the full chain; do not trust "it opens in a browser"
curl / Node fail, browser worksBrowser masks the problemTreat curl as ground truth
Only some Android devices failOld trust store, no AIA fetchSend the full chain
Intermediate did not sign the leafWrong intermediate in the chain fileServe the intermediate whose subject matches the leaf's issuer
You configured cert.pemLeaf only, no intermediatesSwitch to fullchain.pem
CDN / load balancer and origin disagreeDifferent chains on each sideUpdate fullchain on both sides

Further reading

Tools: SSL Checker checks the live chain · Certificate Decoder shows issuer and AIA · Certificate & Key Matcher also confirms the certificate and key pair

Related: SSL Certificate Formats Explained · Check Whether a Certificate Matches Its Private Key · ACME HTTP-01 vs DNS-01

Go deeper: SSL Certificates: The Complete Guide · Certificate Types Compared · SSL certificate selector

FAQ

Should I include the root in the fullchain?

No. Clients already have it; sending it only adds bytes and confusion.

Why does Chrome work while curl, Java or Android fail?

Some clients cache intermediates or fetch them via AIA; others do not. Judge by curl, not by your browser.

Does a CDN hide this?

No. The CDN terminates TLS with its own certificate, so uploading only the leaf passes the broken chain through to visitors.

What is the difference between cert.pem, chain.pem and fullchain.pem?

In Certbot's directory: cert.pem is leaf only, chain.pem is intermediates only, fullchain.pem is leaf + intermediates. Use fullchain.pem in Nginx/Apache.

What do I need to do about Let's Encrypt's new roots?

Usually nothing manually — clients receive the new chain automatically. Just make sure no config pins a specific intermediate, and that older clients' trust stores contain ISRG Root X1/X2.

Free SSL/TLS tools

Verify and inspect your certificates in seconds.

Related Certificate Info

Learn more about choosing and buying certificates.