Founding prices until 15 December: 30% off Pro, locked for life. See pricing

$ … x509: certificate signed by unknown authority

'certificate signed by unknown authority': fixing TLS trust

The client can't build a chain from the server's certificate to a CA it trusts.

Networking

What it means

To trust a certificate, the client follows its issuer up to a root CA in its trust store. The server must send the intermediates; the client must trust the root. Self-signed and private-CA certificates fail until you add the CA.

Causes and fixes

Most likely first. Run the check, and if it matches, apply the fix.

1. The server sends only its own certificate, not the intermediate (most common with Let's Encrypt and commercial CAs)

Check:

openssl s_client -connect host:443 -servername host -showcerts </dev/null | grep -E 's:|i:'

Fix: Serve the full chain (the certificate followed by the intermediates, fullchain.pem).

2. A private CA or self-signed certificate the client doesn't trust

Check:

openssl x509 -in cert.pem -noout -issuer -subject

Fix: Install the CA certificate in the client's trust store (update-ca-certificates), or pass it explicitly (--cacert).

3. The client's CA bundle is old or missing (minimal container images)

Check:

ls /etc/ssl/certs | head

Fix: Install ca-certificates in the image.

Fix it yourself

A live machine in your browser with this problem already on it. The grader checks the result.

Open the lab

No account needed for your first tries.

Related errors