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
wwwand 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
- Add your site as a monitor.
- 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.
- Add a notification destination that someone actually reads, such as a shared channel rather than one inbox.
- 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
- Look at the logs of your renewal job to find out why it failed.
- Renew the certificate, for example with
certbot renew, and reload your web server so it serves the new one. - Wait for the next check, or run it manually, to confirm the new expiry date.
- Fix the cause so the next renewal does not fail the same way.