What Is HTTP-01 Validation?
HTTP-01 validation proves you control a domain by serving a token at a fixed path over plain HTTP. It is the simplest ACME challenge, and it cannot issue a wildcard.
How the check works
- Your client asks for a certificate for
example.com. - The CA returns a token and a required response value.
- The client writes the response to a file named after the token.
- The CA requests it from the domain on port 80.
- On a match, the CA issues the certificate.
The path is always the same:
http://example.com/.well-known/acme-challenge/<token>The CA may follow redirects, but the rules are strict. A redirect from HTTP to HTTPS is usually accepted, while one that sends the request to an unrelated host or to a port other than 80 or 443 can fail. Check your CA's current documentation for the exact behavior.
Requirements
- Port 80 must be reachable from the public internet.
- The domain must point at the server answering the challenge.
- The token path must be served as a static file, without login or rewrite rules.
- It cannot validate wildcard names. For those, use DNS-01 validation.
Running it
The webroot method puts the token in your existing document root while the server keeps running. With Certbot it looks like this:
sudo certbot certonly --webroot -w /var/www/example \
-d example.com -d www.example.comStandalone mode starts a temporary server on port 80, so stop anything else bound to that port first:
sudo certbot certonly --standalone -d example.comHTTP-01 validation: why it fails
| Problem | What happens | Fix |
|---|---|---|
| Firewall blocks port 80 | CA times out | Open port 80 to the world, at least for validation |
| Forced redirect to another host | CA cannot reach the token | Exempt the challenge path from the redirect |
| CDN or proxy caches the path | Old or wrong content served | Bypass cache for /.well-known/acme-challenge/ |
| DNS points to old server | Token written on the wrong machine | Update the A or AAAA record and wait |
| IPv6 record broken | CA connects over IPv6 and fails | Fix the AAAA record or remove it |
| App returns 404 for dot paths | Framework hides .well-known | Add an explicit location for the path |
The IPv6 case is easy to miss. Many CAs prefer IPv6 when a AAAA record exists, so a server that works on IPv4 can still fail validation. How DNS records affect SSL issuance explains why.
Nginx example
If your site redirects everything to HTTPS, keep the challenge path outside the redirect:
server {
listen 80;
server_name example.com;
location /.well-known/acme-challenge/ {
root /var/www/example;
}
location / {
return 301 https://$host$request_uri;
}
}HTTP-01 validation versus other challenges
HTTP-01 needs no DNS API access and works with every ACME client, so it is a good first choice. It is a poor fit for wildcards, for servers with no public port 80 and for fleets where many hosts must share one certificate. In those cases look at DNS-01, or at TLS-ALPN-01 when only port 443 is open.
Checking before you request
Before you ask for a certificate, test the challenge path yourself. Create a small file in the challenge directory and fetch it from a machine outside your network:
echo ok > /var/www/example/.well-known/acme-challenge/test
curl -i http://example.com/.well-known/acme-challenge/testYou should see a 200 response and the text. If you get a redirect to another site, a 403 or a login page, fix that first. Delete the test file when you are done. If the redirect is the culprit, redirecting HTTP to HTTPS without losing SEO shows a safe setup. Remember to check both the bare domain and the www name, since each is validated separately and each needs to reach the right server.
For the full picture of when renewal can break after a working first issue, see fixing Certbot renewal errors.
Key takeaways
- HTTP-01 serves a token under
/.well-known/acme-challenge/on port 80. - It cannot issue wildcard certificates.
- Most failures come from firewalls, redirects, caches and broken IPv6.
- Test with a dry run before relying on renewal.
Related reading: MPIC, DNS validation errors, getting a certificate with Certbot and acme.sh as an ACME client.
Frequently Asked Questions
Can HTTP-01 issue a wildcard certificate?
No. A wildcard needs DNS-01, because the CA cannot ask one host to prove control of every name at that level.
Does it work behind Cloudflare or another proxy?
Only if the challenge path reaches your server. With the proxy on, the request stops at the edge, so either let that path through or switch to DNS-01.
Why does validation fail when the site loads fine?
Usually a redirect, an IPv6 address that points somewhere else, or a firewall on port 80. Fetch the exact challenge URL from outside your network before you request the certificate again.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.