Fix: "Unable to Get Local Issuer Certificate"
By MinniHost Guides Editorial Team Review by MinniHost Guides Editorial Team Last checked Posted Topic: SSL & HTTPS
The error "unable to get local issuer certificate" means the client could not find the certificate that signed one of the certificates in the chain. Either the server did not send its intermediate certificate, or the client's trust store lacks the root. Fix the server first by installing the full chain, then the client's trust store. Do not switch verification off.
Part of our guide: What Is an SSL Certificate? How HTTPS Works
General information, not professional security or financial advice. Check your host’s and certificate authority’s current documentation; steps differ by provider.
“Unable to get local issuer certificate” appears when a program tries to verify a website’s certificate and cannot find who signed one link of the chain. It is a trust problem, not a sign that the site is hacked. This page sits under our guide to what an SSL certificate is and shows how to tell whether the server or your own computer is at fault, then fix it properly.
What does the error mean?
OpenSSL, the library behind many tools, defines it this way: the issuer certificate of an untrusted certificate cannot be found. The client walked up the certificate chain and reached a certificate whose signer was neither sent by the server nor present in the local trust store.
Programs built on OpenSSL print the message as is; other tools word it differently. The related message “self-signed certificate in certificate chain” means a chain was built but no suitable trust anchor was found in the trust store.
What are the three usual causes?
Almost every case is one of three things.
- The server did not send its intermediate certificate. Only the leaf was installed, so clients cannot link it to a root.
- The client’s trust store lacks the root. An old or minimal system, container image or runtime has an outdated or empty list of roots.
- Something on the network is replacing the certificate. A filtering proxy or security product presents its own certificate, signed by a root your client has not been given.
How do I tell which side is at fault?
Check the server from a machine that has a normal trust store and from a second network. If every client fails, the server is the problem. If only one machine or network fails, look at the client.
Connect with OpenSSL, giving the server name so the right certificate is returned:
openssl s_client -connect example.com:443 -servername example.com -showcerts
The -showcerts option prints the certificates the server sent, in the order sent. Per OpenSSL’s documentation this is the raw list and not a verified chain, which is what you want here. If only one certificate appears, the intermediate is missing. You can also paste the PEM certificates into our in-browser certificate decoder; it sends nothing to us.
How do I fix it on the server?
Install the full chain. Take the certificate bundle from your certificate authority, or the full chain file from your ACME client, and configure the server to use it. RFC 8446 requires the server’s certificate first, then certificates that each certify the one before. In cPanel’s SSL installer there is a CA bundle (CABUNDLE) field for exactly this purpose. Reload the web server, then test again from a command-line tool, not only a browser.
How do I fix it on the client?
Fix the trust store, not the check. The right step depends on the program, so use its own documentation. Common approaches are:
- Update the system’s CA certificates if the machine or container image is old.
- Point the program at the correct bundle. OpenSSL-based programs read defaults from the file or directory in the SSL_CERT_FILE and SSL_CERT_DIR environment variables. Other runtimes, such as Git, Node and Python, have their own settings.
- Add your organisation’s root if a proxy inspects traffic. Obtain it from your IT team, not from a download site.
What not to do
- Do not disable verification (for example
curl -k,verify=False, or turning off SSL checks in Git) in production. The connection stays encrypted but you no longer know who you are talking to. - Do not install a root certificate you cannot trace to its owner.
- Do not paste your private key into any tool while troubleshooting.
How do I stop it coming back?
Most repeat cases come from renewal. When a certificate is renewed, install the new chain, not only the new leaf. Let’s Encrypt notes that backup intermediates may be used without warning, so avoid hard-coding an old intermediate. Set a reminder or monitor expiry; see renewing an SSL certificate and the Let’s Encrypt guide.
Sources re-opened and compared with this text by the MinniHost Guides team on 2026-11-17. The team holds no engineering licence or vendor certification.
Your questions answered
What does unable to get local issuer certificate mean?
It means the verifying program could not find the issuer of a certificate in the chain, either among the certificates the server sent or in its own trust store. OpenSSL describes it as the issuer certificate of an untrusted certificate not being found. The fix depends on whether the server omitted an intermediate or the client lacks a root.
Is it safe to ignore this error?
No. Ignoring it, for example by turning off verification in curl or a script, means the client accepts any certificate, including one presented by an attacker on the network. That removes the protection TLS gives. Find the cause instead: install the full chain on the server, or add the missing root to the client's trust store.
Why does curl fail but my browser works?
The browser and the command-line tool use different trust stores and may handle an incomplete chain differently. A browser may succeed with a server that omitted its intermediate certificate, while a stricter library reports that the issuer cannot be found. Test with OpenSSL s_client and the server name to see exactly what the server sends.
How do I fix it for Git?
First work out whether the cause is the server's chain or your machine's trust store, using the steps on this page. If the server is missing its intermediate, the site owner must fix it. If your network uses its own root, add that root to the trust store your Git build reads. Check Git's documentation for the setting; do not turn verification off.
Can a corporate proxy cause it?
Yes. Some networks inspect encrypted traffic and present their own certificate, signed by a root the organisation controls. A client that does not have that root cannot find a trusted issuer and reports this error or the self-signed chain error. Ask your IT team for the correct root certificate and add it to the trust store.
Where this comes from
- OpenSSL documentation: X509_STORE_CTX_get_error (docs.openssl.org)
- OpenSSL documentation: openssl-s_client (docs.openssl.org)
- OpenSSL documentation: openssl-env (docs.openssl.org)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 (rfc-editor.org)
- cPanel documentation: SSL/TLS (docs.cpanel.net)
- Let's Encrypt: Chains of Trust (letsencrypt.org)
- What Is an SSL Certificate? How HTTPS Works
An SSL certificate links a website's public key to its domain name so browsers can encrypt traffic and check who they reach. How it works, what it proves
- How to Get an SSL Certificate for Your Website
Get an SSL certificate: check your host, use automatic issuance or buy one, install it, force HTTPS and fix mixed content, with WordPress notes.
- Let's Encrypt: Free SSL Certificates Explained
Let's Encrypt issues free, automated, domain-validated SSL certificates. How ACME issuance and renewal work, the limits, and how free compares with paid.
- How to Renew an SSL Certificate Before It Expires
Renew an SSL certificate before it expires: check the end date, fix failed automatic renewals, renew a purchased one and plan for shorter lifetimes.
- What Is an SSL Certificate Chain? Root and Intermediate
An SSL certificate chain links your site's certificate through intermediates to a trusted root. What to send, common errors and how to fix them.
- SSL Certificate Types: DV, OV, EV, Wildcard, SAN
SSL certificate types differ in validation (DV, OV, EV) and coverage (single, wildcard, multi-domain SAN). Compare them and see which suits a small site.