Ingress returns "404 Not Found" / "default backend - 404" (ingress-nginx)
The ingress controller received the request but no Ingress rule matched the host/path, so it answered with its default backend.
default backend - 404404 Not Found nginx ingressingress returns 404 Meaning
ingress-nginx serves a 404 page when the Host header or path doesn’t match any rule, the Ingress lacks the right ingressClassName (so this controller ignores it), or the path type/rewrite doesn’t match the URL.
Common causes
- Missing or wrong ingressClassName (controller ignores the Ingress)
- Host in the rule differs from the requested host (www vs apex)
- pathType/Prefix vs Exact mismatch or missing rewrite
- Ingress in another namespace from the Service it references
⚡ Quick fix
- kubectl get ingress -A and check CLASS and HOSTS
- Request with the exact host: curl -H 'Host: app.example.com'
- Check controller logs for the request
Detailed fix by platform
YAML
- bash
spec: ingressClassName: nginx rules: - host: app.example.com http: paths: - path: / pathType: Prefix backend: { service: { name: web, port: { number: 80 } } }
How to diagnose
- Class — ingressClassName matches the controller?
- Host — Exact match?
- Logs — kubectl logs -n ingress-nginx deploy/ingress-nginx-controller
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Kubernetes
- cannot re-use a name that is still in use Error: INSTALLATION FAILED: cannot re-use a name that is still in use
- error converting YAML to JSON error converting YAML to JSON: yaml: line 12: did not find expected key
- unknown field strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl"
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026