Waiting for HTTP-01 challenge propagation wrong status code '404', expected '200'
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
When setting up HTTPS for your domain using Let's Encrypt, a common challenge is the HTTP-01 challenge. This is one method used by Let's Encrypt to verify domain ownership. However, during this process, many encounter the following error: "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'." This error occurs during the verification step when the Let's Encrypt server tries to access a file served over HTTP on your domain but receives a 404 error instead of the expected 200 status code. This indicates that some issue is preventing the challenge from being served correctly.
In this article, we'll explore what this error means, why it might occur, and possible solutions to troubleshoot and resolve it.
Understanding the HTTP-01 Challenge
Let's Encrypt uses the ACME (Automated Certificate Management Environment) protocol to issue certificates. The HTTP-01 challenge is part of this protocol and works as follows:
- Challenge Generation: Let's Encrypt generates a unique token for your domain.
- Web Server Configuration: You need to serve a specific HTTP resource at
http://<your-domain>/.well-known/acme-challenge/<token>``. - Verification: Let's Encrypt attempts to retrieve the file. The server expects a 200 HTTP status code, confirming domain control.
Why "404 Not Found" Can Occur
Common Causes
- File Placement:
- The challenge file might not be in the correct directory or does not exist.
- Web Server Misconfiguration:
- The web server might not have correct permissions or configurations to serve files from the
.well-known/acme-challenge/directory.
- DNS Propagation:
- If you've recently updated your DNS records, changes might not have propagated fully across the internet.
- Cache Interference:
- Proxy servers or CDNs might cache an older version or a 404 error, preventing the challenge file from being correctly accessed.
- URL Rewrites/Redirects:
- Rewrite rules in
.htaccessor server configuration could redirect requests away from the.well-known/path.
Troubleshooting Steps
Verifying File Presence
First, ensure that the challenge file is present at the correct location:
- Local path typically used:
/var/www/your-domain/.well-known/acme-challenge/. - You can test manually retrieving the file through your browser or using
curl:
Related reading
- WARNING API 'variant.getJavaCompile' is obsolete and has been replaced with 'variant.getJavaCompileProvider
- Warning mysql_connect 2002 No such file or directory trying to connect via unix///tmp/mysql.sock in
- WCF - How to Increase Message Size Quota
- WCF service startup error This collection already contains an address with scheme http
- WARN Failed to send SSL Close message(Kafka SSL configuration issue)
- Warning about SSL connection when connecting to MySQL database
- Warning Accessing non-existent property 'MongoError' of module exports inside circular dependency
- Warning Attempt to present on which is already presenting null

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.