Skip to content

SSL Certificate Error

Quick summary

Your HTTPS site shows a security warning because the SSL certificate is invalid, expired, or misconfigured.

Why this happens

  • The SSL certificate has expired

  • The certificate is for a different domain (name mismatch)

  • The certificate is self-signed and not trusted by the browser

  • The server is missing intermediate certificates in the chain

Minimal example

✗ Broken code
// Browser error: NET::ERR_CERT_DATE_INVALID
// Certificate expired on 2026-01-01
https://example.com → Security warning
✓ Fixed code
// Renew certificate and install full chain
// Using Let's Encrypt:
// certbot certonly --webroot -w /var/www -d example.com -d www.example.com
// Auto-renew: certbot renew --dry-run

Renew the expired certificate and install the full chain (including intermediate certificates). Let's Encrypt provides free certificates with auto-renewal.

How to diagnose

  • Click the browser warning to see the specific error (NET::ERR_CERT_DATE_INVALID, etc.)

  • Use an SSL checker tool (e.g., ssllabs.com) to diagnose the certificate

  • Check the certificate expiration date and domain names

How to fix

  • Renew the expired certificate with your certificate authority

  • Ensure the certificate covers the correct domain (including www)

  • Install the full certificate chain including intermediate certificates

  • Use Let's Encrypt for free, auto-renewing certificates

How to prevent

  • Set up automatic certificate renewal (e.g., certbot auto-renew)

  • Monitor certificate expiration dates

  • Use a CDN or hosting provider that manages SSL certificates

Related Resources

Related Glossary

Related Lessons

← Back to language