Monitory
← All guides

Guides

How to monitor SSL certificate expiry

Why certificates expire unnoticed, what to watch and how to be warned weeks before visitors see a browser warning.

Why certificates expire unnoticed

An SSL certificate has a limited lifetime, often 90 days. Automatic renewal works until it does not: a DNS record changed, a disk filled up, a renewal job stopped, a firewall blocked the validation request. Nobody notices until visitors see a browser warning and your site looks hacked.

What to watch

  • Days left. The certificate and its intermediate certificates must be valid for long enough to leave you time to react.
  • Hostname coverage. The certificate must cover every name you serve, including www and your subdomains.
  • Trust and strength. The chain must be complete and signed by a trusted authority, without weak keys or outdated signature algorithms.
  • Surprise certificates. A certificate issued for one of your names that you did not request can reveal a phishing site or a forgotten server.

Set it up

  1. Add your site as a monitor.
  2. Enable the certificate check. It inspects the certificate every 30 minutes and warns you 14 days before expiry by default, a threshold you can change.
  3. Add a notification destination that someone actually reads, such as a shared channel rather than one inbox.
  4. Add the domain expiry check too. A lapsed domain takes your site and email offline just as surely as an expired certificate.

When the alert fires

  1. Look at the logs of your renewal job to find out why it failed.
  2. Renew the certificate, for example with certbot renew, and reload your web server so it serves the new one.
  3. Wait for the next check, or run it manually, to confirm the new expiry date.
  4. Fix the cause so the next renewal does not fail the same way.

Keep reading