CertHaloSSL expiry monitoring · by IncubXperts

Let's Encrypt under the hood: how ACME works and how to fix failures

How Let's Encrypt validates HTTP-01 and DNS-01 challenges, the rate limits that matter, and how to diagnose the most common ACME errors.

CertHalo team7 min read

Most of the time, Let's Encrypt is invisible: Certbot or cert-manager asks for a certificate, gets one, and renews it every couple of months. When it fails, the error messages are short and the cause is usually somewhere else: a firewall, a DNS record, a CDN, a rate limit.

This post explains what actually happens when an ACME client requests a certificate, how Let's Encrypt checks that you control a domain, and how to diagnose the failures people run into most.

What happens during a request

ACME (RFC 8555) is a JSON API over HTTPS. Each request is signed with your account key, a key pair your client creates once and keeps. A certificate request goes like this:

  1. Account. The client registers its account key (once), or reuses an existing account.
  2. Order. The client asks for a certificate for a list of names, for example example.com and www.example.com.
  3. Authorizations. For each name, the CA returns an authorization with one or more challenges the client can choose from.
  4. Challenge. The client puts a token in place and tells the CA it's ready.
  5. Validation. The CA checks the token, from several places on the internet.
  6. Finalize. Once every name is valid, the client sends a certificate signing request (CSR) with a new key.
  7. Download. The CA issues the certificate; the client saves it and, if configured, reloads the server.

If you've recently proved control of a name, Let's Encrypt can reuse that authorization for a while and skip steps 4 and 5. Those reuse periods are getting shorter, so expect validation on almost every renewal in future.

The token

The value you publish is not a password the CA invents. It's the key authorization: the challenge token joined with a fingerprint of your account key. That ties the proof to your account, so someone who sees the token can't use it for their own account.

  • For HTTP-01, the file at /.well-known/acme-challenge/<token> contains the key authorization.
  • For DNS-01, the TXT record at _acme-challenge.<name> contains a SHA-256 hash of it.

How Let's Encrypt validates

HTTP-01

Let's Encrypt connects to the name on port 80 and fetches http://<name>/.well-known/acme-challenge/<token>.

  • It follows redirects, but only to http or https on ports 80 and 443. A redirect to HTTPS is fine, even with an invalid or expired certificate.
  • If the name has an IPv6 (AAAA) record, it's used. A stale AAAA record pointing at an old server is a classic cause of failures that "work when I test it".
  • HTTP-01 can't issue wildcard certificates.

DNS-01

Let's Encrypt looks up the TXT record at _acme-challenge.<name> through its own resolvers, which query your authoritative name servers directly.

  • Needed for wildcards (*.example.com) and for hosts that aren't reachable from the internet.
  • The record has to exist on all your authoritative name servers before the client says it's ready. Slow propagation between them is the most common DNS-01 failure.
  • You can delegate just this record: a CNAME from _acme-challenge.example.com to a zone your ACME client can update keeps DNS API keys with full access off your servers.

TLS-ALPN-01

Let's Encrypt connects to port 443 and expects a special self-signed certificate during the TLS handshake. It's handy when port 80 is closed, but it needs a client or server built for it (Caddy and Traefik support it).

From several places at once

Let's Encrypt checks each challenge from its main data centres and from several other networks around the world, and most of them have to agree. This protects against attackers who hijack internet routing to fake a validation, and it's now required of every public CA.

It also means geo-blocking breaks validation. If your firewall or CDN only allows traffic from your own country, the remote checks fail. Let's Encrypt doesn't publish a fixed list of addresses to allow, and the locations change, so challenge paths need to be reachable from anywhere.

CAA records

Before issuing, Let's Encrypt checks the domain's CAA records, which say which CAs may issue for it. If a CAA record exists and doesn't include letsencrypt.org, issuance is refused. A DNS server that times out on CAA queries also blocks issuance.

Rate limits that matter

Let's Encrypt is free and shared, so it limits how much each account and domain can request. The ones people actually hit:

Limit Value Usually caused by
Certificates for the exact same set of names 5 every 7 days Reinstalling the client or deleting its data on every deploy
Validation failures per name, per account 5 per hour Retrying a broken setup in a loop
Certificates per registered domain (for example example.com) 50 every 7 days Many subdomains with separate certificates
New orders per account 300 every 3 hours Large hosting platforms
New accounts per IP address 10 every 3 hours Creating a new account for every server or container

Limits refill gradually rather than all at once. Renewals of an existing certificate (same names) don't count towards the per-domain and per-account order limits.

Always test against the staging environment first: https://acme-staging-v02.api.letsencrypt.org/directory. With Certbot, --dry-run uses it automatically. Staging certificates aren't trusted, but its limits are far higher.

Troubleshooting common errors

Exact wording varies by client, but the CA's part of the message is usually recognisable.

Error looks like What it means What to check
Timeout during connect (likely firewall problem) Let's Encrypt couldn't reach port 80 (or 443) Firewall, security group, port forwarding, geo-blocking, the right IP in DNS
Connection refused The address answered but nothing listens on that port Web server running? Listening on the public interface?
Invalid response from http://…/.well-known/acme-challenge/…: 404 The server answered, but not with the token Wrong web root; a redirect or rewrite rule catching /.well-known/; another server answering (stale AAAA record, wrong load balancer)
DNS problem: NXDOMAIN looking up A for … The name doesn't exist in public DNS Typo, or the record was never created
DNS problem: SERVFAIL looking up CAA for … Your DNS server failed to answer a CAA query DNSSEC problems, broken or old DNS servers
CAA record for … prevents issuance Your CAA records don't allow Let's Encrypt Add 0 issue "letsencrypt.org"
No TXT record found at _acme-challenge… / Incorrect TXT record DNS-01 record missing, old or not yet on every name server Increase the client's propagation wait; check all authoritative servers; remove old records
too many certificates (5) already issued for this exact set of identifiers Duplicate certificate limit Stop re-issuing; use the certificate you have, or wait for the limit to refill
too many failed authorizations Validation failure limit Fix the cause using staging, then try again

A step-by-step check

  1. Read the full log. Certbot writes to /var/log/letsencrypt/letsencrypt.log; cert-manager records events on the Challenge and Order resources (kubectl describe challenge -A).

  2. Test the challenge path from outside your network, for example from a phone on mobile data, or another server:

    echo test | sudo tee /var/www/html/.well-known/acme-challenge/test
    curl -4 -i http://example.com/.well-known/acme-challenge/test
    curl -6 -i http://example.com/.well-known/acme-challenge/test
    

    Both should return 200 and test. If only one does, look at your A or AAAA record.

  3. For DNS-01, ask each authoritative server directly:

    for ns in $(dig +short NS example.com); do echo "$ns: $(dig +short TXT _acme-challenge.example.com @$ns)"; done
    
  4. Check CAA: dig CAA example.com, and the parent domain if there's none.

  5. Try the free Let's Debug tool, which runs many of these checks for you.

  6. Retry against staging until it works, then switch back.

After issuance: check what's actually served

A successful ACME run means the CA issued a certificate. It doesn't mean visitors are getting it. Common gaps:

  • The web server wasn't reloaded, so it still serves the old certificate.
  • One server behind a load balancer got the new certificate; the others didn't.
  • The certificate was installed without its intermediate, so API clients reject the incomplete chain.
  • A CDN or proxy in front serves its own certificate, which renews on a different schedule.

Let's Encrypt stopped sending expiry reminder emails in June 2025, so if renewal quietly stops, nothing warns you. And as lifetimes shrink (Let's Encrypt's default drops to 64 days in February 2027 and 45 days in February 2028), there's less time to notice. See how to automate renewal and our Certbot renewal guide.

How CertHalo helps

CertHalo checks each of your hostnames on a schedule, the way a browser would, and alerts you by email, Slack, Microsoft Teams or webhook when a certificate is getting close to expiry, has changed, is served with an incomplete chain, doesn't match its name or has been revoked. If a Let's Encrypt renewal fails or never gets loaded, you find out while there are still weeks left to fix it.

Run the free SSL checker on a domain now, or monitor 3 certificates free.

Key takeaways

  • ACME is a signed JSON API: account, order, authorizations, challenge, validation, finalize, download.
  • HTTP-01 needs port 80 open from everywhere; DNS-01 needs the TXT record on every authoritative server and is the only way to get wildcards.
  • Let's Encrypt validates from several networks worldwide, so geo-blocking breaks it.
  • The rate limits people hit most are 5 duplicate certificates a week and 5 failed validations an hour. Test against staging.
  • After issuance, check the certificate that's actually served.

Sources

Check your certificate now

See when it expires, who issued it, whether the chain is complete and if it's been revoked. Free, no sign-up.

Want a reminder before it expires? Monitor 3 certificates free.

More from the blog