Skip to content

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

Key points

  • certbot renew --dry-run shows the problem safely.
  • HTTP-01 needs port 80 reachable on the challenge path.
  • A renewed certificate still needs a reload.
  • Rate limits apply, so test against staging.

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.

Common causes

  • Port 80 closed by a firewall or security group.
  • A redirect or rule catching the challenge path.
  • A CDN or proxy answering in place of the origin.
  • DNS pointing elsewhere, including a stale AAAA record.
  • The timer is not running.
  • Rate limits from repeated failed attempts.

Diagnose it

Run a dry run and read the log. Test the challenge path from outside.

bash
# 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.com

Fixes

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.

Frequently asked questions

How often does Certbot renew?

It checks twice a day and renews within 30 days of expiry.

Do I need port 80 open?

For HTTP-01, yes. DNS-01 does not need it.

Why does the site still show the old certificate?

The web server was not reloaded after renewal.

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.