Skip to content
RU

MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT in Firefox: How to Fix It

What it means: The server certificate is signed by its own key, so no trusted CA vouches for it.

  1. Confirm issuer equals subject in View Certificate
  2. On intranets or devices, verify it with IT
  3. Public site: install a CA-issued certificate
  4. For development, use a local CA such as mkcert

Test your URL now

Runs a full TLS check: handshake, protocol versions, certificate chain, trust and expiry.

Check your site's SSL →

What MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT means

A self-signed certificate names itself as issuer and is signed with its own private key. Firefox first tries to build a chain to a trusted root; when no issuer exists and the certificate verifies as self-signed, it reports MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT with the line "The certificate is not trusted because it is self-signed." A certificate signed by a private CA that you have not imported gives SEC_ERROR_UNKNOWN_ISSUER instead.

The connection is still encrypted, but nothing proves you reached the real server. Chromium's source puts it precisely: a self-signed certificate provides "no defense against active attackers (but foiling passive attackers)". This is a trust problem at the TLS layer, not DNS, not HTTP. The Chrome and Edge counterpart is NET::ERR_CERT_AUTHORITY_INVALID.

Causes in Firefox, Chrome, Edge and Safari

BrowserWhat you seeMost common trigger
Firefox"Warning: Potential Security Risk Ahead", MOZILLA_PKIX_ERROR_SELF_SIGNED_CERTRouter, NAS or appliance admin page; placeholder certificate on a web server
Chrome"Your connection is not private", NET::ERR_CERT_AUTHORITY_INVALIDSame
Edge"Your connection isn't private", same Chrome codeSame
Safari"This Connection Is Not Private"Same

Where self-signed certificates come from: admin interfaces of routers, NAS boxes, printers and hypervisors; the Debian and Ubuntu placeholder pair /etc/ssl/certs/ssl-cert-snakeoil.pem used by Apache's default-ssl site; a certificate made with openssl req -x509 on a staging server that ended up in production; and a TLS terminator falling back to its built-in certificate after a failed upload.

Recent Chromium source also defines ERR_CERT_SELF_SIGNED_LOCAL_NETWORK for self-signed certificates on .local names and private (RFC 1918) IP addresses. On public hostnames Chrome reports ERR_CERT_AUTHORITY_INVALID.

Behind Cloudflare, nginx or another proxy

A self-signed certificate on the origin is invisible to visitors while a CDN terminates TLS. Cloudflare's Full mode accepts it without validation; Full (strict) rejects it with error 526. The clean fix is a Cloudflare Origin CA certificate or a public certificate on the origin. Visitors see the self-signed certificate only when the record is DNS only or Cloudflare is paused.

The same applies to your own reverse proxy. nginx does not verify an HTTPS upstream unless told to, so a self-signed backend works but is unauthenticated. Verify it against your internal CA instead of switching checks off:

location / {
    proxy_pass https://10.0.0.5:8443;
    proxy_ssl_verify              on;
    proxy_ssl_trusted_certificate /etc/nginx/internal-ca.pem;
    proxy_ssl_server_name         on;
    proxy_ssl_name                app.internal;
}

If you own the site

  1. Confirm the diagnosis:
    openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
      | openssl x509 -noout -subject -issuer
    # identical subject and issuer = self-signed; s_client also prints num=18:self-signed certificate
  2. Public site: replace it with a publicly trusted certificate, e.g. sudo certbot --nginx -d example.com -d www.example.com, or point Apache's SSLCertificateFile and SSLCertificateKeyFile away from the snakeoil pair. Guide: free Let's Encrypt setup.
  3. Intranet and devices: run an internal CA, issue leaf certificates with SAN entries from it, and deploy the CA root to all clients through device management or Firefox enterprise policy.
  4. Local development: use a local CA instead of one-off self-signed certificates:
    mkcert -install                       # creates a local CA and trusts it
    mkcert example.test localhost 127.0.0.1 ::1
    # → ./example.test+3.pem and ./example.test+3-key.pem
    On Linux, Firefox trust needs certutil (NSS tools) installed before mkcert -install. Never share the generated rootCA-key.pem.
  5. Do not import the server certificate itself under Authorities. If it carries CA:TRUE, which openssl req -x509 adds by default in OpenSSL 3, Firefox then fails with MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY.

If you are a visitor

  • A public site (shop, bank, webmail) with a self-signed certificate: do not continue. It is either broken or someone is intercepting the connection; contact the owner another way.
  • Your own device (router at 192.168.1.1, NAS): accepting the risk is reasonable once you compare the SHA-256 fingerprint in View Certificate with the one shown in the device's console or manual. Firefox remembers the exception; remove it under Settings > Privacy & Security > Certificates > View Certificates > Servers.
  • A work intranet: ask IT whether the certificate is expected, and whether they can deploy their CA instead.

On HSTS sites Firefox shows no exception button at all (HSTS errors). Clearing the cache does nothing, because certificates are not stored in the HTTP cache.

How to confirm the fix

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | grep "Verify return code"
# → Verify return code: 0 (ok)

curl -sS -o /dev/null https://example.com/ && echo OK
# still self-signed: curl: (60) SSL certificate problem: self-signed certificate

For an outside view of the issuer and chain your server presents, run the enterno.io SSL checker.

Related errors

CertificateExpiry, issuer, domains (SAN)
ChainIntermediate and root CA validation
TLS ProtocolTLS version and cipher suite
VulnerabilitiesHeartbleed, POODLE, weak ciphers

Why teams trust us

TLS 1.3
supported
Full
CA chain check
3,158
checks in 30 days
30/14/7
days-to-expiry alerts

How it works

1

Enter domain

2

TLS chain verified

3

Expiry date & vulnerabilities

What Does the SSL Check Cover?

SSL/TLS is the encryption protocol that protects data between the browser and server. Our tool analyzes the certificate, chain of trust, TLS version, and knownvulnerabilities.

Certificate Details

Issuer, validity period, signature algorithm, covered domains (SAN), and validation type (DV/OV/EV).

Chain of Trust

Full chain verification: from leaf certificate through intermediates to root CA.

TLS Analysis

Protocol version (TLS 1.2/1.3), cipher suites, Perfect Forward Secrecy (PFS) support.

Expiry Alerts

Set up a monitor — get Telegram and email alerts 30/14/7 days before expiration.

DV vs OV vs EV Certificates

DV (Domain Validation)
  • Confirms domain ownership only
  • Issued in minutes automatically
  • Free via Let's Encrypt
  • Suitable for most websites
  • Most common certificate type
OV / EV
  • Organization (OV) or Extended Validation (EV)
  • Issued in 1-5 business days
  • Costs $50 to $500/year
  • For finance, e-commerce, government sites
  • Increases user trust

Who uses this

DevOps

SSL certificate monitoring

Security

TLS config audit

SEO

HTTPS as ranking factor

E-commerce

customer trust

Common Mistakes

Expired certificateBrowsers block sites with expired SSL. Set up auto-renewal or monitoring.
Incomplete certificate chainWithout intermediate CA, some browsers and bots cannot verify the certificate.
Mixed content on HTTPS siteHTTP resources on an HTTPS page — the browser lock icon disappears, reducing trust.
Using TLS 1.0/1.1Legacy TLS versions have known vulnerabilities. Use TLS 1.2+ or 1.3.
Domain mismatch in certificateThe certificate must cover all site domains, including www and subdomains.

Best Practices

Set up auto-renewalLet's Encrypt + certbot with cron — certificate renews automatically every 60-90 days.
Enable HSTSStrict-Transport-Security header forces browsers to always use HTTPS.
Use TLS 1.3TLS 1.3 is faster (1-RTT handshake) and safer — legacy ciphers removed.
Monitor expiration datesCreate a monitor on Enterno.io — get notified well before expiration.
Verify chain after renewalAfter certificate renewal, confirm that intermediate certificates are installed.

Get more with a free account

SSL certificate monitoring, check history and alerts 30 days before expiry.

Sign up free

Learn more

Sources

Frequently Asked Questions

Can I use a self-signed certificate on a public website?

No. Every visitor gets a full-page warning, and they cannot tell your certificate from an attacker's. Publicly trusted certificates from Let's Encrypt cost nothing and renew automatically.

Is it safe to accept the risk for my router or NAS?

Yes, if you are on your own network and the SHA-256 fingerprint matches the one the device reports. Firefox stores the exception, so you only do this once per certificate.

Why does mkcert work without warnings but my openssl certificate does not?

mkcert creates a local CA, adds it to the system and Firefox trust stores, and signs your certificates with it. A plain openssl self-signed certificate has no trusted issuer, so every browser on every machine warns.

I imported my self-signed certificate into Firefox and now get a different error. Why?

If the certificate has the CA:TRUE basic constraint, Firefox treats it as a CA and refuses it as a server certificate, reporting MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY. Use a local CA that signs a separate server certificate instead.

How do I remove an exception I added in Firefox?

Open Settings > Privacy & Security > Certificates > View Certificates > Servers and delete the entry. Clearing the cache does not remove it, because exceptions are stored separately from cached pages.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.