Check the expiry date with openssl s_client -connect example.com:443 -servername example.com | openssl x509 -noout -enddate. For Let’s Encrypt, run sudo certbot renew and reload your web server. If renewal had been failing silently, find out why — usually a blocked port 80, a changed DNS record or a broken renewal timer — or it will expire again.
Symptoms
- Browsers show NET::ERR_CERT_DATE_INVALID or “Your connection is not private”
- API clients fail with certificate verify errors
- curl reports “certificate has expired”
How to diagnose it
Check the served certificate
Shows the dates of the certificate the server actually presents.
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -dates -subject -issuerList certbot certificates
Shows expiry and the domains each covers.
sudo certbot certificatesTest renewal
A dry run shows the exact error without changing anything.
sudo certbot renew --dry-runCheck the renewal timer
certbot installs a systemd timer or cron job.
systemctl list-timers | grep -i certbot
Common causes and fixes
Renewal failing on the HTTP challenge
Port 80 must be reachable and /.well-known/acme-challenge/ must not be redirected elsewhere or blocked by a firewall or CDN rule.
Renewed but web server not reloaded
The new file is on disk but the old certificate is still in memory. Reload and add a deploy hook.
sudo systemctl reload nginx
sudo certbot renew --deploy-hook "systemctl reload nginx"Renewal timer disabled or missing
Enable it.
sudo systemctl enable --now certbot.timerCertificate installed manually on a load balancer or CDN
Renew it where it is served — the copy on the origin server may not be the one visitors see.
Prevent it happening again
- Add a Statance SSL certificate monitor to alert days before expiry, based on the certificate visitors actually receive.
- Add an HTTP check so a broken certificate on a live site alerts immediately.
Set it up: SSL certificate monitoring · Website uptime monitoring · Domain expiry monitoring.
FAQ
How long are Let’s Encrypt certificates valid?
90 days. certbot renews them when 30 days remain.
Why does my site still show the old certificate after renewing?
The web server has not reloaded, or a CDN or load balancer serves its own copy.
Related guides
Get alerted before this becomes an outage.
Install the agent in one line. Statance watches CPU, memory, disk and services, and its AI assistant helps find the cause.