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

Self-Signed Certificates: Trust Errors in Browsers and Apps

Self-Signed Certificates: Trust Errors in Browsers and Apps
Private CA: keep the root key offline and apply name constraints to the issuing intermediate.

A self-signed certificate signs itself and acts as its own root, so no trust store knows it by default. Browsers, curl, Java, Python, and mobile apps all reject it with a trust error — which is the correct, expected behavior. Self-signed certificates are acceptable for local development and testing, but public services should use a publicly trusted CA, and real internal services are better served by a private CA: install only the CA root in clients, then issue short-lived leaf certificates. Adding a certificate to one trust store (for example your browser) does not fix curl, Java, Python, or mobile apps — each maintains its own.

Why the trust error is "correct"

Every client validates the server certificate against its own trust store and fails when it finds no matching trusted root. The goal is to make the right client trust the right certificate, not to disable validation. So a self-signed certificate erroring everywhere is a security mechanism working as designed.

Install the certificate into the right trust store

Export the certificate PEM and install it into every store that actually connects: browsers rely on the OS keychain (macOS/Linux/Windows); curl uses a CA bundle (-cacert or SSL_CERT_FILE); Java uses keytool-managed cacerts; Python uses SSL_CERT_FILE or the requests verify parameter; mobile apps use their own stores. Restart the client after installing.

The better option: a private CA

For real internal services, create a private CA, install only its root in client stores, and issue short-lived leaf certificates from it. Every internal service is then trusted without per-host installs, and you avoid the man-in-the-middle risk of disabling validation with curl -k or verify=False.

Step 1: Confirm it is a trust problem, not something else

Use the SSL Checker or openssl to confirm the error is "self-signed / untrusted" rather than expiry or hostname mismatch. Self-signed shows as openssl return code 18 or 19.

Step 2: Export and distribute the certificate

Export the certificate PEM from the server, verify its contents with the Certificate Decoder, then distribute it to each client that needs to connect.

Step 3: Install trust per client

Install the certificate into the relevant store for each client (OS keychain, curl, Java cacerts, Python, app) as described above, then restart the client.

Stand up a private CA for internal services, install its root on clients, and issue short-lived certificates — eliminating per-machine installs and avoiding disabled validation.

Troubleshooting checklist

SymptomLikely causeWhat to do
Browser shows NET::ERR_CERT_AUTHORITY_INVALIDSelf-signed or missing intermediateInstall in OS keychain or deploy trusted chain
curl reports self signed / 60curl does not trust the certUse -cacert or set SSL_CERT_FILE
Java reports PKIX / cacerts issueJava has its own trust storeImport into cacerts with keytool
Python requests raises SSLErrorPython ships its own CA bundleSet SSL_CERT_FILE or verify=path
Browser trusts it but the app failsApp uses its own trust logicInstall separately in the app's store
Works only with verify=FalseValidation disabled (unsafe)Install the cert or use a private CA

Tools & further reading

FAQ

Is it OK to use curl -k or verify=False?

Only for throwaway local testing. Disabling validation exposes you to man-in-the-middle attacks. For anything persistent, install the certificate or use a private CA.

Why does the browser trust it but the app still fails?

Browsers read the OS keychain; many apps (Java, Python, mobile) maintain their own trust logic. Install the certificate into every store the client actually reads.

Can self-signed certificates be used in production?

Not recommended for public-facing services. Internet users will not install your self-signed root and will always error. Internal services are better served by a private CA, balancing security and manageability.

How is a private CA better than self-signed?

You install the CA root once on clients; every leaf it signs is then trusted, which makes rotation and short lifetimes easy, and avoids the security downgrade of disabling validation everywhere.

Free SSL/TLS tools

Verify and inspect your certificates in seconds.

Related Certificate Info

Learn more about choosing and buying certificates.

Related articles