The TLS certificate expires soon
- Check
tls.expiry- Severity
- high
- Runs
- on our side, against a domain you verified
- Looks at
- Days until the certificate expires (warn under 21, fail under 7)
What the check looks at
Once a day the service connects to the domain on port 443, reads the certificate the server sends and counts the days until its notAfter date. Under 21 days is a warning, under 7 days a failure.
Why it matters
When the certificate expires, browsers show a full-page error and API clients, payment callbacks and mobile apps stop connecting. Certificates from Let's Encrypt last 90 days and certbot renews them 30 days before they expire by default, so a certificate with less than 21 days left usually means renewal has failed at least once. Let's Encrypt stopped sending expiry e-mails on 2025-06-04, and lifetimes are getting shorter: Let's Encrypt moves to 45 days by 2028, and the CA/Browser Forum limit falls to 47 days in March 2029.
How to fix it
Find out why renewal failed, then renew.
certbot (Debian, Ubuntu, RHEL family):
sudo certbot certificates # expiry date per certificate
sudo certbot renew --dry-run # shows the error without changing anything
sudo journalctl -u certbot.service -n 50 # Debian, Ubuntu: log of the timer runs
sudo certbot renew # renew what is due
Typical errors: port 80 blocked for the HTTP-01 challenge, a DNS API token that expired for DNS-01, a changed web root, or a domain that now points to another server.
Caddy renews on its own; look at its log: sudo journalctl -u caddy -n 100 | grep -i -E 'renew|obtain|error'.
The certificate was renewed but the server still sends the old one. The web server was not reloaded. Reload it (sudo systemctl reload nginx, apache2, httpd) and add a deploy hook so it happens automatically, for example a script in /etc/letsencrypt/renewal-hooks/deploy/ that runs systemctl reload nginx.
A certificate bought from a CA needs a new order; consider moving to ACME if your CA supports it.
How to check the fix
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -enddate
The date should be about one certificate lifetime ahead. The next daily check clears the warning.
When a warning is fine
- Very short certificates (the 6-day Let's Encrypt
shortlivedprofile) are always under 21 days. If you use them on purpose, monitor renewal with a shorter threshold of your own. - A domain that is being shut down and will not be renewed.