What the message looks like
Certbot failed to authenticate some domains (authenticator: nginx).
Domain: example.com
Type: connection
Detail: 203.0.113.10: Fetching http://example.com/.well-known/acme-challenge/hkQ3...: Timeout during connect (likely firewall problem)Common causes
- A firewall or cloud security group blocks incoming port 80.
- The DNS record points to a wrong or old IP address.
- The domain has an AAAA record, but the server is not reachable over IPv6. Let's Encrypt prefers IPv6.
- The server sits behind NAT and port 80 is not forwarded.
- A CDN or proxy in front does not pass the challenge path.
Check
- Which addresses does the domain have?
- Is port 80 reachable from outside? (run from another machine)
curl -I http://example.com/.well-known/acme-challenge/test - Is anything listening on port 80 here?
ss -ltnp | grep ':80 ' - What does the firewall allow?
ufw status verbose
Fix
- Open port 80, also in the cloud provider's security group:
ufw allow 80/tcp. - Fix the A record, or remove an AAAA record that does not work, or make the server answer on IPv6.
- Forward port 80 on the router if the server is behind NAT.
- If port 80 cannot be opened, use the DNS challenge instead:
certbot certonly --manual --preferred-challenges dns -d example.com. - Then renew:
certbot renew --dry-runto check without using up the rate limit.
Typical scenario
Automatic renewal has run for months but fails after a server move. You pointed the A record at the new IP, yet an old AAAA record still points to the previous server. In the Certbot output the Detail line shows an IPv6 address with "Timeout during connect". Let's Encrypt prefers IPv6. So first read which address stands after "Detail:", then delete the AAAA record or point it to the new server.
FAQ
Does port 443 matter for this error?
No. The HTTP challenge always uses port 80, even if the site runs on 443 only. Keep port 80 open and redirect it to https.
Why does it only fail for some domains?
Often one of them has a broken AAAA record. Check each domain with dig AAAA.
How do I test renewal without burning rate limits?
Use certbot renew --dry-run. It uses Let's Encrypt's staging environment, whose limits are far more generous, and issues no real certificate. Alternatively create a test certificate with --staging. Both test the whole path including port 80.
Can I allow the Let's Encrypt servers by IP in the firewall?
That is not advisable. Validation comes from changing addresses and from several networks at once, and Let's Encrypt does not publish a fixed list for it. Keep port 80 open to the internet and limit what is served over it instead.
Does a redirect from HTTP to HTTPS break the validation?
No, the HTTP-01 check follows redirects. It only goes to ports 80 and 443, though, and the target must be reachable or validation still fails. A certificate error on the target is no problem, as it is not checked during this validation.