
troubleshooting
cert-manager: wrong status code '404', expected '200' — who answered the HTTP-01 challenge
Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200' is cert-manager's own self-check. Find what answered and fix it.
Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'
is not Let’s Encrypt rejecting you. It is cert-manager testing its own work before
it asks the CA to look: it fetched
http://<domain>/.well-known/acme-challenge/<token> from inside the cluster, and
whatever answered was not the solver pod cert-manager had just created.
Until that self-check passes, cert-manager does not ask the ACME server to validate anything. Nothing has failed at the CA. The job is to find out who sent the 404.
The fastest check
kubectl get certificate,certificaterequest,order,challenge -n shop
kubectl get challenge -n shop -o wide
NAME READY SECRET AGE
certificate.cert-manager.io/shop-tls False shop-tls 50s
NAME APPROVED DENIED READY ISSUER REQUESTER AGE
certificaterequest.cert-manager.io/shop-tls-1 True False pebble system:serviceaccount:cert-manager:cert-manager 50s
NAME STATE AGE
order.acme.cert-manager.io/shop-tls-1-4055246940 pending 19s
NAME STATE DOMAIN AGE
challenge.acme.cert-manager.io/shop-tls-1-4055246940-2699325864 pending shop.example.com 19s
NAME STATE DOMAIN REASON AGE
shop-tls-1-4055246940-2699325864 pending shop.example.com Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200' 19s
The Certificate’s own status only says Issuing certificate as Secret does not exist. That is the reason issuance started (the trigger whenever the Secret is
missing, as on a first issuance: internal/controller/certificates/policies/checks.go:46),
not why it is stuck. The real reason is always on the Challenge.
Then request the URL yourself, from inside the cluster, because that is where
cert-manager requests it from. The token is in kubectl get challenge -o jsonpath='{.items[0].spec.token}':
kubectl -n shop run curl --rm -i --restart=Never --image=curlimages/curl -- \
-sS -i http://shop.example.com/.well-known/acme-challenge/w5JGjFc-vGxs2kfHQ_ArySLNK_J_Wt9KCr3QOUuhNcU
HTTP/1.1 404 Not Found
Content-Length: 153
Content-Type: text/html
Date: Wed, 30 Sep 2026 08:02:51 GMT
Server: nginx/1.31.6
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.31.6</center>
</body>
</html>
That page is not the ingress controller and not the solver. It is the
application’s own nginx: the request reached the app’s catch-all route, which
means the route to the solver does not exist as far as the ingress controller is
concerned. Read the Server header and the body before anything else; they tell
you which box to open.
Every output here is from a kind cluster on Kubernetes 1.37.0 running
cert-manager v1.21.2 (the latest release when this was written, published 11
September 2026), Traefik 3.7.13 as the ingress controller and Gateway, and
Pebble 2.10.1 as an in-cluster ACME
server. cert-manager 1.21 is tested against Kubernetes 1.33 to
1.36; none of the behaviour here is
specific to the Kubernetes version. Source references are to the v1.21.2 tag.
How a Certificate turns into a Challenge
cert-manager splits one issuance across a chain of objects, each created and
owned by a different controller. The From column of the events names them:
| Object | Created by | Event that records it |
|---|---|---|
| Certificate | cert-manager-ingress-shim (from the Ingress annotation) | CreateCertificate, on the Ingress |
| CertificateRequest | cert-manager-certificates-request-manager | Requested, on the Certificate |
| Order | cert-manager-certificaterequests-issuer-acme | OrderCreated, on the CertificateRequest |
| Challenge | cert-manager-orders | Created, on the Order |
| solver Pod, Service, Ingress or HTTPRoute | cert-manager-challenges | Presented, on the Challenge |
The Order controller copies the matching solver from the Issuer into
challenge.spec.solver, and names the Challenge from a hash of that spec
(pkg/controller/acmeorders/util.go:73). That detail matters for the fix: when
you correct the Issuer, the required Challenge gets a new name, and the Order
deletes the old one and creates a replacement. You do not have to delete anything
by hand.
What the self-check does
In pkg/issuer/acme/http/http.go:
- The request is a plain
GET http://<dnsName>/.well-known/acme-challenge/<token>(buildChallengeUrl, line 200). The name is resolved by the controller pod’s own resolver, so cluster DNS, unless you pass--acme-http01-solver-nameservers(line 274, flag incmd/controller/app/options/options.go:130). - Any status other than 200 returns
wrong status code '%d', expected '%d'(line 311). A connection failure returnsfailed to perform self check GET request '<url>': <error>instead (line 305), and a 200 with the wrong body returnsdid not get expected response(line 330). Three different messages, three different problems. - It follows redirects, and does not verify certificates if a redirect lands on HTTPS (lines 226–270), matching what Let’s Encrypt does.
- It needs five passes in a row, two seconds apart (
requiredPasses: 5, line 88; the sleep at line 181). Each request times out after ten seconds (line 299).
The Waiting for %s challenge propagation: %s wrapper is added in
pkg/controller/acmechallenges/readiness.go:56. On failure the Challenge is
requeued (sync.go:203–215) after --dns01-check-retry-period, which defaults to
10 seconds and, despite the name, applies to HTTP-01 too. Only when the check
passes does acceptChallenge (sync.go:446) tell the ACME server to validate.
You can see that in the lab. Pebble created the order at 08:02:13 and logged no validation attempt until 08:03:35, eighteen seconds after the fix below. The app behind the catch-all logged every self-check:
10.244.0.34 - - [30/Sep/2026:08:02:54 +0000] "GET /.well-known/acme-challenge/w5JGjFc-vGxs2kfHQ_ArySLNK_J_Wt9KCr3QOUuhNcU HTTP/1.1" 404 153 "-" "cert-manager-challenges/v1.21.2 (linux/arm64) cert-manager/922a06aa49ee4bb802db268ef72a174af70edd32" "10.244.0.24"
The user agent is cert-manager’s; the last field (X-Forwarded-For) is the
cert-manager pod. If your app logs look like this, you have found who is
answering.
Prove the solver itself works
Request the solver Service directly. It listens on 8089, and it only answers for
the right Host header:
kubectl -n shop get svc -l acme.cert-manager.io/http01-solver=true
kubectl -n shop run curl --rm -i --restart=Never --image=curlimages/curl -- \
-sS -i -H "Host: shop.example.com" \
http://cm-acme-http-solver-wzdgj:8089/.well-known/acme-challenge/w5JGjFc-vGxs2kfHQ_ArySLNK_J_Wt9KCr3QOUuhNcU
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Date: Wed, 30 Sep 2026 08:02:56 GMT
Content-Length: 87
Content-Type: text/plain; charset=utf-8
w5JGjFc-vGxs2kfHQ_ArySLNK_J_Wt9KCr3QOUuhNcU.1OTryF98xUB1cMT195Vhqd7_JjhXFSRMz2RMvplEyuQ
A 200 here and a 404 through the domain puts the fault between the two: routing
or DNS. Leave out the Host header and the solver returns its own 404, a
plain-text 404 page not found, and logs why (pkg/issuer/acme/http/solver/solver.go,
lines 91–110):
I0930 08:03:01.445709 1 solver.go:99] "invalid host" logger="cert-manager.acmesolver" host="cm-acme-http-solver-wzdgj" ... expected_host="shop.example.com"
So a proxy that rewrites Host also produces this error, and the solver logs are
where it shows.
Cause 1: the solver route is not picked up
The cause reproduced above, and the first one to rule out. The Issuer tells cert-manager to create the solver Ingress with a class no controller in the cluster owns:
NAME CLASS HOSTS ADDRESS PORTS AGE
ingress.networking.k8s.io/cm-acme-http-solver-j9n5p nginx shop.example.com 80 25s
ingress.networking.k8s.io/web traefik shop.example.com 80, 443 15m
kubectl get ingressclass
NAME CONTROLLER PARAMETERS AGE
traefik (default) traefik.io/ingress-controller <none> 17m
There is no nginx class. The solver Ingress exists, is valid, and is ignored.
Traffic for shop.example.com goes to the only route that matches it, the app’s
/ prefix, and the app 404s.
The retirement of ingress-nginx makes this easy to walk into. Kubernetes announced the retirement of
Ingress NGINX
in November 2025, with best-effort maintenance until March 2026 and no releases
after that; the
kubernetes/ingress-nginx
repository is now archived. Clusters that migrated to another controller or to
Gateway API often kept their ClusterIssuer, and ingressClassName: nginx (or
class: nginx) is the line that did not move.
Fix it by making the solver match a class from kubectl get ingressclass. The
solver takes ingressClassName (sets the field), class (sets the legacy
kubernetes.io/ingress.class annotation) or name (adds the path to an existing
Ingress); only one may be set (pkg/apis/acme/v1/types_issuer.go, lines
264–285). Edit the Issuer manifest, or for a single-solver Issuer:
kubectl -n shop patch issuer pebble --type=merge \
-p '{"spec":{"acme":{"solvers":[{"http01":{"ingress":{"ingressClassName":"traefik"}}}]}}}'
A merge patch replaces the whole solvers list, so do not use this form on an
Issuer with several solvers. Watching the Challenges while patching:
NAME STATE DOMAIN AGE
shop-tls-1-4055246940-2699325864 pending shop.example.com 61s
shop-tls-1-4055246940-4121499594 shop.example.com 0s
shop-tls-1-4055246940-2699325864 pending shop.example.com 64s
shop-tls-1-4055246940-2699325864 pending shop.example.com 64s
shop-tls-1-4055246940-4121499594 shop.example.com 0s
shop-tls-1-4055246940-4121499594 shop.example.com 0s
shop-tls-1-4055246940-4121499594 pending shop.example.com 0s
shop-tls-1-4055246940-4121499594 pending shop.example.com 0s
shop-tls-1-4055246940-4121499594 valid shop.example.com 21s
shop-tls-1-4055246940-4121499594 valid shop.example.com 21s
shop-tls-1-4055246940-4121499594 valid shop.example.com 21s
The Order created a Challenge with a new name and removed the old one, as the
naming rule predicts (with --output-watch-events the old one’s last line reads
DELETED). As soon as the new one was valid, the Certificate followed:
NAME READY SECRET AGE
shop-tls False shop-tls 92s
shop-tls False shop-tls 116s
shop-tls True shop-tls 116s
shop-tls True shop-tls 116s
The same mistake on Gateway API
With the gatewayHTTPRoute solver cert-manager creates an HTTPRoute instead,
attached to the parentRefs you give it. The controller has to run with
--enable-gateway-api (options.go:184). The equivalent of the wrong class is a
Gateway that will not accept the route, and here Kubernetes tells you. A Gateway
whose listener has the default allowedRoutes.namespaces.from: Same, and a
solver HTTPRoute created in the Certificate’s namespace:
kubectl -n shop get httproute -o custom-columns='NAME:.metadata.name,ACCEPTED:.status.parents[0].conditions[?(@.type=="Accepted")].status,REASON:.status.parents[0].conditions[?(@.type=="Accepted")].reason'
NAME ACCEPTED REASON
cm-acme-http-solver-lkmpk False NotAllowedByListeners
The Challenge said the same wrong status code '404', expected '200', and the
request got Traefik’s own 404, 404 page not found in plain text. Allowing
routes from other namespaces on the listener fixed it without touching
cert-manager:
kubectl -n traefik patch gateway traefik-gateway --type=json \
-p='[{"op":"replace","path":"/spec/listeners/0/allowedRoutes/namespaces/from","value":"All"}]'
The Certificate was Ready about fifteen seconds later. On Gateway API, check the
solver HTTPRoute’s Accepted condition first; it names the problem.
Cause 2: the domain resolves somewhere else from inside the cluster
cert-manager resolves the domain with the cluster’s DNS. With split-horizon DNS
or an internal zone of the same name, the self-check can reach a different server
from the one the internet reaches. (A load balancer that cannot hairpin traffic
back into the cluster is a connection failure instead, so it shows up as the
failed to perform self check GET request form.) A Certificate for www.example.com, a name nothing in the lab
redirected into the cluster, failed with the identical message. The same curl
from inside the cluster showed why:
kubectl -n shop run curl --rm -i --restart=Never --image=curlimages/curl -- \
-sS -o /dev/null -D - -w 'resolved to %{remote_ip}\n' \
http://www.example.com/.well-known/acme-challenge/<token>
HTTP/1.1 404 Not Found
Date: Wed, 30 Sep 2026 07:53:17 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: cloudflare
resolved to 172.66.147.243
The 404 came from a CDN on the public internet, not from anything in the cluster.
shop.example.com, which the lab’s CoreDNS rewrites to the Traefik Service,
resolved to 10.96.146.98, its ClusterIP. Compare the address curl reports with
where your ingress really is.
Fix it in one of three ways:
- Make in-cluster DNS agree with public DNS. For the lab that was one CoreDNS
line,
rewrite name shop.example.com traefik.traefik.svc.cluster.local, which sends the self-check straight to the ingress controller. - Point the self-check at other resolvers with the controller flag
--acme-http01-solver-nameservers, for example public ones, when the internal answer is the wrong one and the public answer is reachable from the cluster. - Skip the self-check. cert-manager 1.21.0 (8 July 2026) added
waitInsteadOfSelfCheckto a solver entry, explicitly for split-horizon DNS and NAT hairpinning. It waits the given duration after presenting and then asks the CA to validate:
solvers:
- http01:
ingress:
ingressClassName: traefik
waitInsteadOfSelfCheck: 30s
Use it only when you know the outside path works. It removes the one check that
costs nothing. With the class still wrong, the same setup waited (the reason
string is in readiness.go:88), went to the CA, and the CA got the 404 instead:
NAME STATE DOMAIN REASON AGE
shop-wait-1-2714968681-3579126505 pending shop.example.com Waiting 10.921280054s before accepting HTTP-01 challenge without self-check 20s
NAME STATE DOMAIN REASON AGE
shop-wait-1-2714968681-3579126505 invalid shop.example.com Error accepting authorization: acme: authorization error for shop.example.com: 403 urn:ietf:params:acme:error:unauthorized: Non-200 status code from HTTP: http://shop.example.com:80/.well-known/acme-challenge/geGar-kWa46kovj1D0d1LRD7l2J5D-6uq7__fvvn_n4 returned 404 60s
The text after 403 is Pebble’s; other CAs word it their own way. Either way the
Order is now invalid, the Certificate records a failed issuance attempt (The certificate request has failed to complete and will be retried), and the
failure has happened at the CA rather than in your cluster.
Cause 3: something in front answers first
The self-check is an ordinary HTTP request for a path on your hostname. Anything
that handles that path before the solver route gets the chance produces this
error: an auth proxy on the whole host, a WAF or CDN rule, a snippet or
middleware on the controller, or a catch-all route that the controller prefers
over the solver’s. cert-manager creates the solver route with pathType: Exact
by default since v1.18 (feature gate ACMEHTTP01IngressPathTypeExact,
internal/controller/feature/features.go:235), and the Ingress matching
rules
give the longest path precedence, so it normally beats a / prefix. A
controller that applies something to the whole host before routing does not
care.
Redirects are followed, so an HTTP-to-HTTPS redirect only breaks the check if the HTTPS side has no route for the path. Request the URL without following redirects to see what is really in the way. With a Traefik entrypoint redirect enabled and no solver route present:
HTTP/1.1 301 Moved Permanently
Location: https://shop.example.com/.well-known/acme-challenge/x
With the solver route present, issuance on Traefik 3.7.13 still succeeded with
that redirect enabled. Other controllers and hand-written redirect rules differ,
so test yours rather than assume. curl -L -k follows the redirect the way
cert-manager does.
Cause 4: port 80 is not reachable from outside
HTTP-01 is port 80 only.
If your load balancer or firewall does not open it, the in-cluster self-check can
pass while the CA still cannot connect. That does not produce this message: the
Challenge moves on, and the failure comes back from the CA as an authorization
error in the Challenge’s reason, as in the Pebble example above. If you cannot
open port 80 at all, use a DNS-01 solver.
Related messages you may see first
- An Issuer that cannot talk to the ACME server never gets this far. Leaving out
the
caBundlefor the lab’s private CA gaveFailed to register ACME account: Get "https://pebble.pebble.svc.cluster.local:14000/dir": tls: failed to verify certificate: x509: certificate signed by unknown authorityon the Issuer. The mechanics of that x509 error are the same as for kubectl, covered in kubectl connection and TLS errors. - If creating the Issuer or Certificate fails with
failed calling webhook "webhook.cert-manager.io"andcontext deadline exceeded, the API server cannot reach cert-manager’s admission webhook; that is covered in failed calling webhook: context deadline exceeded. - If the
cm-acme-http-solver-*pod isPending, nothing can serve the token. Debug it as a scheduling problem: Pod Pending and FailedScheduling.
Preventing it
- Keep the solver in step with the controller. When you change ingress
controller or move to Gateway API, grep your Issuers and ClusterIssuers for
class:andingressClassName:in the same change. - Check the Challenge, not the Certificate.
kubectl get challenge -A -o wideshows every pending self-check and its reason in one line each. - Curl from inside the cluster as the first diagnostic step, and read the
Serverheader. It names whoever answered. - On Gateway API, allow the solver’s namespace on the listener you point
parentRefsat, and check the HTTPRoute’sAcceptedcondition. - Reach for
waitInsteadOfSelfChecklast, only for real split-horizon or hairpin setups where you have tested the outside path.
KubeGlance lists every cert-manager Certificate and TLS Secret by expiry, shows the Ready and Issuing condition messages of one that is stuck, and can alert when a certificate is not ready or about to expire. It is a native Kubernetes client for iPhone and iPad, with a full Mac app on the same core.
Get KubeGlanceThe Kubernetes dashboard that fits in your pocket
KubeGlance is a native Kubernetes client for iPhone and iPad — the real dashboard, not a companion — with a full Mac app on the same core. Pods, workloads, logs and events, straight from your kubeconfig.
Download KubeGlanceChoosing a Kubernetes client? Compare KubeGlance with Lens, k9s, Headlamp and Aptakube, or see the Mac and iPhone options.


