Challenges¶
For each name, the client proves that it controls it, with an answer only it can give. It chooses one of three ways (ACME calls them challenges):
| Challenge | The CA checks | Needs |
|---|---|---|
http-01 |
an HTTP request to the name on port 80 | the name points to the client's machine; port 80 there is reachable from the CA |
tls-alpn-01 |
a TLS connection to the name on port 443, asking for the protocol acme-tls/1 |
the same, for port 443. Good where port 80 is closed, or a TLS server already runs on 443 |
dns-01 |
the DNS TXT record _acme-challenge.<name> |
the client can write DNS records (ACME clients have plugins for most DNS servers and providers). Works for machines the CA cannot reach at all |
Wildcards¶
Wildcard names (*.example.com) can only be proved with dns-01:
controlling the DNS of example.com is what speaks for every name below
it.
Choosing the challenges offered¶
All three are offered by default. To allow only some:
- Leave out
http-01where the network between the CA and the hosts is not trusted: plain HTTP is the easiest of the three for someone on that path to answer in a host's place. - Without
dns-01, wildcard orders are refused. - A reload changes the list, also for authorizations that are still pending.
dns-01 and the resolver¶
For dns-01, the CA asks the resolvers of its own machine. Better is to
name the DNS server that holds the zone, so that no cache answers "no such
record" from before the client created it:
IP addresses¶
IP addresses are proved with http-01 or tls-alpn-01; dns-01 cannot
prove one. See IP addresses.
When a challenge fails¶
The log has ACME challenge failed with the name and the reason, and the
client gets the error from the CA. Typical causes:
| Cause | Fix |
|---|---|
| The name resolves to another machine (from the CA's point of view) | Fix DNS, or /etc/hosts on the CA for internal names. |
| Port 80 / 443 not reachable from the CA | Open the firewall from the CA to the host. |
| Another web server holds port 80 | Use the client's webroot mode, or stop it during the challenge. |
dns-01: the CA sees an old answer |
Set dns_resolver to the authoritative server. |
Wildcard with http-01 |
Use dns-01. |
A failed proof stays failed; the client places a new order.