⚖️
blog.cat.ssl

HTTP-01 vs DNS-01: Which ACME Challenge Should You Use?

24.11.2026
← All articles

Before issuing a certificate, Let's Encrypt has to confirm that whoever sent the request actually controls the domain. It does so by asking you to complete a challenge. Two methods dominate in practice: HTTP-01, where you serve a special file from the website, and DNS-01, where you publish a special TXT record in the domain's zone. A third method, TLS-ALPN-01, exists but is rarely used outside specialised proxies.

How HTTP-01 works

The ACME client (Certbot, acme.sh or a hosting panel module) receives a token and places it under /.well-known/acme-challenge/. Let's Encrypt then fetches that file over plain HTTP on port 80 from several vantage points. Redirects to HTTPS are followed, but the first request always hits port 80.

certbot certonly --webroot -w /var/www/misol.uz -d misol.uz -d www.misol.uz
curl -I http://misol.uz/.well-known/acme-challenge/test

Its strength is simplicity: no DNS provider access, no API keys. If the domain points to the server and port 80 is open, it just works, which is why virtually every shared host, sayt.uz included, issues free certificates this way.

Where HTTP-01 falls short

HTTP-01 cannot issue wildcard certificates; *.misol.uz requires DNS-01. The domain must point to the requesting server at validation time, so during a migration the check may land on the old machine. Port 80 must be reachable, so closing it in the firewall silently breaks renewals; keep it open and redirect to HTTPS instead. Behind a load balancer, the challenge file must exist on every node or the path must be routed to one.

How DNS-01 works

The client computes a value from the token and publishes it as a TXT record named _acme-challenge. Let's Encrypt looks it up via DNS. The web server is not involved at all, so you can certify a site that is offline or a server on a private network.

certbot certonly --manual --preferred-challenges dns -d misol.uz -d '*.misol.uz'
dig +short TXT _acme-challenge.misol.uz @ns1.misol.uz

Manual mode is only for testing. In production the client must create and delete the record through your DNS provider's API, via Certbot plugins or acme.sh hooks. Without an API you will be editing records by hand every couple of months, and eventually someone forgets.

DNS-01 risks and delays

Automation means storing a DNS API token on the server. If the server is compromised, that token can rewrite the whole zone, including mail records. Scope it to one zone and DNS edit only. A cleaner option is to delegate _acme-challenge with a CNAME to a separate zone used only for validation; Let's Encrypt follows CNAMEs, so the main zone needs no API access.

_acme-challenge.misol.uz.  IN  CNAME  misol-uz.acme.example.uz.

Propagation is the other trap. Let's Encrypt queries your authoritative nameservers, and if a secondary lags behind, validation can hit the stale one. Most DNS hooks have a wait setting; increase it if failures recur.

Choosing in practice

A private clinic's website in Samarkand on shared hosting, with one or two subdomains, should use HTTP-01: nothing to store, the panel handles issuance and renewal. A service that gives every customer a subdomain like dokon1.misol.uz needs a wildcard, so DNS-01 is the only option. An internal CRM reached as crm.misol.uz that is invisible from the internet can only get a public certificate through DNS-01.

CriterionHTTP-01DNS-01
WildcardNoYes
Port 80 requiredYesNo
Internal serverNoYes
DNS API keyNot neededNeeded for automation

Sites behind a CDN or proxy

With a proxy such as Cloudflare, HTTP-01 requests pass through it first. Forced-HTTPS rules, caching or bot protection can block the challenge path; either exempt /.well-known/acme-challenge/ or switch to DNS-01, which ignores proxy settings entirely. Either way, you need reliable control of your DNS records; sayt.uz customers edit A, CNAME and TXT records in the cabinet's DNS section. In short: HTTP-01 for ordinary sites, DNS-01 for wildcards, internal servers and complex proxy setups.

Related articles

🔒 How to Fix Mixed Content in WordPress: A Step-by-Step Guide 🔍 Free Tools to Check Your SSL Certificate: From Browser to Terminal 💻 SSL for local development: trusted HTTPS with mkcert 🔄 The End of OCSP and the Return to CRLs: What Site Owners Should Know
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓