Troubleshooting guide
Let's Encrypt renewal failed: how to fix Certbot errors
Renewal depends on Let's Encrypt being able to verify your domain. When something changes the path to that verification, the failure stays silent until expiry.
3 min read10 sectionsUpdated
On this page
How renewal works
Certbot asks Let's Encrypt for a new certificate. For HTTP-01, it places a token at /.well-known/acme-challenge/, and Let's Encrypt fetches it from the public internet. DNS-01 proves control with a TXT record instead. Certificates last 90 days, and renewal normally begins 30 days before expiry.
# Safe rehearsal against the staging environment
sudo certbot renew --dry-run
# Details of the last failure
sudo tail -60 /var/log/letsencrypt/letsencrypt.log
# Is the renewal timer active?
systemctl list-timers | grep -i certbot
# Is the path reachable from outside?
curl -si http://example.com/.well-known/acme-challenge/test | head -5
# IPv6 is tried first if an AAAA record exists
dig +short AAAA example.comFixes
Open port 80. Serve the challenge path before any HTTPS redirect, in its own location block. Remove or fix bad AAAA records. Behind a proxying CDN, or for wildcards, move to DNS-01 with your DNS provider's plugin. Add a deploy hook that reloads the web server:
certbot renew --deploy-hook "systemctl reload nginx"
If you hit rate limits, wait, and use --dry-run for testing in the future.
The reload that nobody remembers
A frequent failure mode does not look like a failure at all. The renewal succeeded, and the new files are on disk, but the web server still has the old certificate in memory, so visitors see an expired one. Certbot's log says all is well. A check that connects to the site and reads the certificate catches this; a check of the file on disk does not. Also confirm that every server that uses the certificate reloads, including mail servers, load balancers and anything that copied the files elsewhere.
Catch it automatically
Alert at 21 days remaining, since automatic renewal should have replaced the certificate by then. SSL monitoring tests what clients actually receive, and certificate automation covers the setup.
Related reading
- Kubernetes readiness probe failed: how to fix it: Fix Kubernetes readiness and liveness probe failures: slow startup, wrong ports, overloaded health endpoints and dependency checks that cause cascading outages.
- net::ERR_FAILED: how to fix it: Fix net::ERR_FAILED in Chrome and the console: CORS preflight failures, service workers, blocked requests, cache problems and extensions, step by step.
- ERR_TUNNEL_CONNECTION_FAILED: how to fix it: Fix ERR_TUNNEL_CONNECTION_FAILED: proxy servers refusing HTTPS tunnels, wrong proxy settings, VPN apps and corporate filters, step by step.
- 408 Request Timeout: causes and how to fix it: Understand 408 Request Timeout: slow client uploads, idle keep-alive connections and proxy settings, and how it differs from a 504 Gateway Timeout.
- ERR_CONTENT_DECODING_FAILED: how to fix it: Fix ERR_CONTENT_DECODING_FAILED: wrong Content-Encoding headers, double gzip compression, broken Brotli, PHP output buffering and proxies, with tests.
- ERR_PROXY_CONNECTION_FAILED: how to fix it: Fix ERR_PROXY_CONNECTION_FAILED ("No internet, there is something wrong with the proxy server"): remove stale proxies, fix PAC files and VPN leftovers.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.