Understanding the http-01 challenge type
masterThe http-01 challenge is the simplest ACME challenge type to implement and is recommended as a default choice. It works by proving domain ownership through a specific file served over HTTP.
How it works
- The ACME authority provides a token.
- You must serve a file at the following URL:
http://$YOUR_DOMAIN/.well-known/acme-challenge/$TOKEN. - The file content must consist of the token and a thumbprint of your account key.
- The ACME authority verifies the challenge by sending HTTP requests to that URL.
Note on redirects: HTTP redirects are followed during verification. While the ACME spec focuses on HTTP, Let's Encrypt allows redirecting to HTTPS.
When to use http-01
- Use it when: You want the simplest implementation and have access to port 80.
- Avoid it when:
- You need to issue wildcard certificates (which require DNS-based challenges).
- Port 80 is unavailable on your server.
- You have multiple web servers that cannot all respond with the correct token simultaneously.