Subject: DNS-01 validation using NS delegation for ACME challenge subdomain
Hi everyone,
I'm working on automating Let's Encrypt DNS-01 validation for customer-managed domains and would like to confirm whether the following approach is supported.
Scenario
- My application manages certificate issuance.
- The customer's DNS is managed by a third-party DNS provider.
- My DNS is hosted in Route 53.
Instead of asking the customer to create a new TXT or CNAME record for every certificate request, I'd like them to perform a one-time DNS configuration.
Configuration
The customer delegates the ACME challenge subdomain to my Route 53 hosted zone by adding NS records such as:
_acme-challenge.example.com. NS ns-1.example.net.
_acme-challenge.example.com. NS ns-2.example.net.
_acme-challenge.example.com. NS ns-3.example.net.
_acme-challenge.example.com. NS ns-4.example.net.
My Route 53 contains a hosted zone named:
_acme-challenge.example.com
When requesting a certificate for:
host1.example.com
my automation creates the TXT record:
host1._acme-challenge.example.com TXT "<challenge-token>"
The authoritative Route 53 nameservers return the correct TXT record.
However, Let's Encrypt fails with:
DNS problem: NXDOMAIN looking up TXT for _acme-challenge.host1.example.com
Public resolvers (for example, Google Public DNS) also return NXDOMAIN for:
_acme-challenge.host1.example.com
Question
Is delegating _acme-challenge.example.com via NS expected to work for DNS-01 validation of arbitrary hostnames such as:
host1.example.comhost2.example.comapi.example.com
Or does ACME require a separate delegation (or CNAME) for each hostname because it queries:
_acme-challenge.<hostname>.example.com
If this approach is not supported, what is the recommended architecture for allowing customers to perform a one-time DNS configuration while enabling automated DNS-01 validation for any future subdomain?
Thanks!