Incomplete certificate chain: why a site works in Chrome but fails in curl
By TechCompare · Updated · How we check
Send your certificate plus every intermediate, in order, and leave the root out. Browsers may cover for a missing intermediate, but curl, scripts and many apps won't.
A browser trusts a site's certificate because it links back to a root certificate the browser already has. That link usually runs through one or two intermediate certificates, and the server is supposed to send them along with its own. When it doesn't, the chain is incomplete. Some browsers patch the gap on their own, which is why the problem hides until an app or script tries to connect.
How this is calculated
Chrome can download a missing intermediate from the address listed in the certificate's Authority Information Access field. Firefox ships the known intermediates of trusted CAs with the browser, so it rarely needs the server's copy. Curl, Python, Go, Java and many mobile apps do neither. They fail with errors like unable to get local issuer certificate.
The usual cause is installing only the certificate file. Many CAs hand out the certificate and the intermediates as separate files, and the server needs both. Certbot writes fullchain.pem for exactly this reason, and pointing a server at cert.pem leaves the intermediate out. Nginx wants the full chain in ssl_certificate. Apache 2.4.8 and later read it from SSLCertificateFile.
Order matters. The site's own certificate comes first, then the intermediate that signed it, then the next one up if there is one. Leave the root out. Clients only trust roots they already have, so sending one just adds bytes to every handshake.
The SSL Checker lists the chain the server sent, from the site's certificate up, with each one's subject, issuer and end date. It flags an incomplete chain when those certificates don't link up to a trusted root on their own.
Verdict
Point your server at the full chain file, not the bare certificate, and reload it after every renewal. Then check the site and read the chain. It should start with your domain, end with an intermediate signed by a well-known root, and show no incomplete chain problem.
More SSL scenarios
Related guides
Frequently asked questions
Why does the site work in my browser but not in curl?
Should I include the root certificate in the chain?
Can an old intermediate break my site after a renewal?
Related tools
DNS Lookup
Look up a domain's DNS records on Cloudflare or compare several resolvers at once, and read its SPF, DMARC and DKIM records in plain words.
Use toolOpen Graph Visualizer
Preview how your website links will look when shared on Google, Twitter, Facebook, and Discord.
Use toolPassword Generator
Generate secure, random passwords locally in your browser.
Use tool