webzod
account

Fix the certificate that browsers reject on nginx

tls.cert.invalid · effort: about an hour

Why it matters

The certificate or its chain fails verification for a reason other than expiry, a wrong name or a missing authority, so browsers refuse it. Without a certificate at all, HTTPS cannot work.

The fix

  1. Check that the server block listens on 443 with ssl enabled and has both ssl_certificate (full chain) and ssl_certificate_key (the matching private key).
  2. Test the configuration and reload nginx.
/etc/nginx/conf.d/site.conf
server {
    listen 443 ssl;
    server_name example.com;
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.