Back to Articles
Comparison2026-05-20•4 min read•CSR.plus Team

ACME HTTP-01 vs DNS-01: Which Challenge to Use?

ACME HTTP-01 vs DNS-01: Which Challenge to Use?

ACME HTTP-01 vs DNS-01: Which Challenge Should You Use? (Wildcards & Firewalls)

Direct answer: ACME (RFC 8555) proves domain control through "challenges", and the boundaries are sharp. HTTP-01 drops a temporary file on port 80, cannot issue wildcards, but can validate IP addresses. DNS-01 publishes a TXT record at _acme-challenge.<domain> and is the only route to a wildcard, requiring no inbound port at all. TLS-ALPN-01 (RFC 8737) completes the handshake on port 443 using the ALPN protocol acme-tls/1 and also cannot issue wildcards. Rule of thumb: HTTP-01 for ordinary public sites, DNS-01 for wildcards or when port 80 is closed.

Core concepts

Challenge comparison

MethodPortWildcardsIP validationInbound port neededSpec
HTTP-0180 only❌✅Yes (80)RFC 8555 §8.3
DNS-01none (DNS write)✅❌NoRFC 8555 §8.4
TLS-ALPN-01443❌✅Yes (443)RFC 8737

How HTTP-01 works

The CA issues a token; your client places it at http://<domain>/.well-known/acme-challenge/<token>, containing the token plus a thumbprint of your account key. The CA fetches it and passes you if the content matches.

HTTP-01's hard limits

Port 80 only — the ACME standard forbids arbitrary ports because they weaken the challenge. It follows up to 10 redirects, only to http: or https: on port 80 or 443, and not to IP addresses; when redirected to HTTPS it does not validate the certificate.

How DNS-01 works

The client hashes "token + account key thumbprint" with SHA-256, base64url-encodes the digest, and publishes it as a TXT record at _acme-challenge.<domain>. Multiple TXT values are allowed for the same name, so parallel orders do not collide.

Why wildcards require DNS-01

*.example.com cannot serve a file at the apex of every possible subdomain; DNS-01 proves control at the zone level, which is the only workable proof. Wildcard authorization is explicit: a wildcard authorization cannot be used for a non-wildcard certificate and vice versa (RFC 8555 §7.4.1).

Reuse and rate limits

Let's Encrypt: 50 certificates per registered domain per 7 days; 5 certificates per identical identifier set per 7 days; 5 failed validations per identifier per hour (refilling ~1 per 12 minutes); 300 new orders per account per 3 hours; ARI-driven renewals are exempt from all limits. (https://letsencrypt.org/docs/rate-limits/, checked 2026-11-10)

Implementation by scenario

Step 1 — Do you need a wildcard?

If yes, DNS-01 is mandatory.

Step 2 — Minimal HTTP-01 config

location ^~ /.well-known/acme-challenge/ { root /var/www/acme; default_type "text/plain"; }

Common traps: a global HTTPS redirect sending the challenge request to 443, a CDN/WAF blocking .well-known, or an ISP blocking port 80.

Step 3 — Minimal DNS-01 config

Create DNS provider API credentials (high-value secrets — scope them to TXT writes only), configure the matching plugin, and wait out the TTL before triggering validation. CNAME delegation is supported: point _acme-challenge.<domain> at a dedicated validation zone so credentials stay centralised.

Step 4 — A correct wildcard order

certbot certonly --dns-<provider> -d "example.com" -d "*.example.com"

Step 5 — Verify before and after go-live

Use Certificate & Key Matcher to confirm the certificate matches its private key, and SSL Checker to check the served chain.

Step 6 — Automate renewal

With certificate lifetimes already capped at 200 days and shrinking further, manual renewal is not sustainable. Verify the timer: systemctl status certbot.timer, or test with certbot renew --dry-run.

Troubleshooting checklist

SymptomMeaningFix
Timeout during connectPort 80 closed or firewalledSwitch to DNS-01, or open 80 temporarily
Unauthorized ... Invalid response / 404.well-known rewritten or blockedCheck location rules and CDN caching
Too many redirectsBeyond 10 hops, or redirecting to an IPServe the challenge file directly on 80
NXDOMAIN on the TXT lookupRecord not propagated or wrong subdomainRe-check with dig TXT _acme-challenge.example.com
Intermittent DNS failuresTTL not expired, NS out of syncValidate only after all authoritative NS agree
Wildcard order rejectedHTTP-01 was usedMust use DNS-01
Rate limit hitToo many failed validations for one identifierBack off and consult the CA's published limits

Further reading

Tools: CSR Generator to generate the CSR and key · Certificate & Key Matcher to confirm the pair · SSL Checker for post-launch review

Related: Wildcard Certificates and DNS-01 · CAA Records Explained · SSL Certificate Formats Explained

Go deeper: SSL Certificates: The Complete Guide · Certificate Types Compared · Choose an SSL certificate with the SSL certificate selector

FAQ

Can HTTP-01 run on 443 or another port?

No. HTTP-01 is port 80 only; use DNS-01 if 80 is unavailable.

Do wildcards always require DNS-01?

Yes. A wildcard cannot prove control by serving a file per subdomain, so DNS-01 is the only path.

Can DNS-01 validate an IP address?

No. DNS-01 is name-based; use HTTP-01 or TLS-ALPN-01 for IP identifiers.

DNS API credentials scare me — is there a middle ground?

Yes: CNAME delegation. Point _acme-challenge at a dedicated validation zone and grant credentials only TXT-write rights there, limiting blast radius.

Which method is safer as lifetimes shrink?

Whatever you can automate. HTTP-01 is simplest for a single public host; DNS-01 is more robust for wildcards, internal hosts or multi-node setups because it needs no inbound port.

Free SSL/TLS tools

Verify and inspect your certificates in seconds.

Related Certificate Info

Learn more about choosing and buying certificates.