Incomplete SSL certificate chain: why it works in Chrome but fails elsewhere
A missing intermediate certificate breaks API clients, curl and mobile apps while browsers look fine. How to detect it with openssl and fix the nginx or Apache config.
· 6 min read · By the Spot Downtime team
The site loads fine in your browser, but a webhook sender, a curl command or a mobile app reports unable to verify the first certificate or SSL certificate problem: unable to get local issuer certificate. The certificate is valid and not expired. The usual cause is an incomplete certificate chain: your server sends its own certificate but not the intermediate one that connects it to a trusted root.
How the chain works
A certificate is trusted if it can be traced to a root certificate the client already has. Certificate authorities rarely sign your certificate with the root directly. They use one or more intermediate certificates:
Root CA (in the client's trust store)
-> Intermediate CA
-> your certificate (example.com)The client has the root. Your server must send your certificate and the intermediate. If the intermediate is missing, the client cannot complete the path.
Why browsers hide the problem
Some browsers cache intermediates from earlier visits to other sites, and some fetch a missing one automatically using the “Authority Information Access” URL inside your certificate. So the page works for you. Most non-browser clients do not do either: curl, Python and Node HTTP libraries, Java, Go services, many payment and webhook providers, and older Android versions. You end up with a site that appears fine and an integration that has been failing silently.
Confirm it
Ask the server what it sends:
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/nullLook at the Certificate chain section at the top. A healthy one lists at least two entries (numbered 0 and 1, sometimes more):
Certificate chain
0 s:CN = example.com
i:C = US, O = Example CA, CN = Example CA R3
1 s:C = US, O = Example CA, CN = Example CA R3
i:C = US, O = Example Root, CN = Example Root X1If only entry 0 appears, the chain is incomplete. Near the bottom you will usually also see Verify return code: 21 (unable to verify the first certificate). A quick curl test shows what an API client would experience:
curl -sv https://example.com -o /dev/null 2>&1 | grep -i -E "verify|issuer|SSL certificate"You can also run the SSL checker, which inspects the certificate your server presents without a terminal.
Fix it: serve the full chain
Your certificate authority gives you the intermediate(s), often as a separate “chain” or “CA bundle” file. Let's Encrypt and most ACME clients write a fullchain.pem that already contains your certificate followed by the intermediates. The mistake is usually pointing the server at cert.pem instead.
nginx
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;If you have separate files, concatenate them with your certificate first, then the intermediate:
cat example.com.crt intermediate.crt > fullchain.crtApache
From Apache 2.4.8, put the full chain in SSLCertificateFile:
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pemOn older versions, the intermediate goes in a separate SSLCertificateChainFile directive. Do not include the root certificate; clients already have it, and sending it only adds bytes.
Load balancers, CDNs and hosting panels
Managed services usually have a separate field for the intermediate or ask you to upload a bundle. Paste your certificate and the chain file in the order the provider describes. If the provider issues the certificate for you, check that you did not override it with an old uploaded copy.
Then reload and re-test:
sudo nginx -t && sudo systemctl reload nginx
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | grep "Verify return code"You want Verify return code: 0 (ok).
Check the order
Other causes of the same error
- Missing SNI. If one IP hosts several sites and you leave out
-servername, openssl may show the wrong certificate. Always pass it. - Old client trust store. A very old OS or Java version may not know a newer root. The chain is fine; the client needs updating.
- Self-signed or private CA. Expected to fail on public clients. See ERR_CERT_AUTHORITY_INVALID.
- Wrong hostname or expiry. Those produce different errors: see ERR_CERT_COMMON_NAME_INVALID and expired certificates.
Prevent it coming back
The chain often breaks at renewal or when you change servers: a new certificate is installed without the bundle, or an automated script copies only cert.pem. Fix the config to reference the full chain file so renewals keep working, and re-check after any certificate change.
- Reference
fullchain.pemin the server config, not the leaf-only file. - Test with openssl or curl after every renewal or migration, not just with a browser.
- Monitor the endpoint with a client that does not forgive a missing intermediate.
Spot Downtime's SSL monitoring tracks certificate expiry and your HTTP checks fail when verification fails, so a broken chain shows up as an alert rather than as a customer report.
SSL checkerInspect the certificate your server presents, its issuer and expiry date.Get new guides by email
Practical posts on monitoring, outages, error fixes and on-call, when they're published. No spam.
Keep reading
- SSL · TroubleshootingCertificate pinning and rotation: how to renew without breaking your appsPinned certificates turn a routine renewal into an outage for mobile apps and API clients. How to pin the public key, plan backup pins and rotate safely.November 9, 2026 · 7 min read
- SSL · TroubleshootingHSTS explained: how to enable it, and how to undo it when it locks you outWhat the Strict-Transport-Security header does, how to roll it out safely, why browsers show an error with no bypass button, and how to remove HSTS or the preload list.November 7, 2026 · 7 min read