DNS-01 in practice: wildcards, provider credentials and _acme-challenge delegation
HTTP-01 is simple: serve a token on port 80. But it's unusable the moment you need a wildcard certificate, your servers aren't publicly reachable, or a CDN/WAF sits in front absorbing the request. DNS-01 — proving control by writing _acme-challenge.<domain> TXT records — is the production-grade answer, and it comes with real operational questions worth understanding.
When DNS-01 is the right choice
- Wildcards (
*.example.com) — the Baseline Requirements forbid HTTP-01 for wildcards; DNS-01 is the only option - Private/internal services — no public listener needed at all
- Behind CDN/WAF — where inbound HTTP gets filtered or terminated at an edge you don't control
- Bulk domains — one DNS credential can validate any number of names in the zone
The cost: you need API credentials for the DNS provider that actually serves the zone. And that sentence hides the most common DNS-01 failure.
"The registrar isn't the DNS operator"
A domain registered at reg.ru may resolve through Cloudflare, Yandex DNS, Selectel, or the company's own BIND. The registrar's API credential writes to the wrong zone; issuance fails at challenge time, sometimes after rate-limit counters have already been spent.
CertCLM removes the guesswork: type the domain into the issue dialog and it resolves the authoritative nameservers — walking up to the zone cut, not just the registrar's default NS — matches ~20 known suffixes (reg.ru, nic.ru, yandex.net, selectel, timeweb, cloudflare, gcore, mws.ru, arvancloud…) against your saved credentials, and pre-selects the right one. Wrong or missing credential → you find out in the dialog, not in a failed order.
Least-privilege DNS: _acme-challenge delegation
Opening write access to your production DNS zone for an automation credential is a real policy problem — that credential can rewrite anything. Delegation solves it cleanly:
_acme-challenge.example.com. IN CNAME acme.example.com.validate.acme-dns.example.net.ACME follows the CNAME (lego does this by default), so the TXT is written into a dedicated zone — a separate zone on your provider or a small BIND instance — while the main zone stays read-only. For organizations that delegate DNS frequently, an NS record for the _acme-challenge subtree pointed at an RFC2136-capable server is even less maintenance: one record covers every hostname forever.
CertCLM supports both patterns today — the credential you configure is just the delegated zone's provider. Details: _acme-challenge delegation docs.
Operational details that matter
- Propagation: ACME CAs check via public resolvers; TXT TTLs should be short, and fresh delegations need a few minutes
- Cleanup: proper providers delete the TXT after validation — leftover challenge records are a hygiene smell
- Reuse window: domain validation can be reused for a limited time (shrinking to 10 days under the new BRs) — automation that re-validates each renewal is unaffected
- Credential scope: prefer API tokens limited to the validation zone where the provider supports it
Next: push, not pull — delivering certificates into CDNs, load balancers and Kubernetes, and verifying the edge actually picked them up.