When you see this status
- User requests a non-existent URL path
- API endpoint is removed or renamed
- Resource is deleted but links remain
- Typo in the URL path or query parameters
- Server misconfiguration routes requests incorrectly
Common causes
- Missing or incorrect route configuration
- Deleted or moved resources without redirects
- Permission issues hiding resources
- Dynamic content generation failure
- Reverse proxy or CDN misconfiguration
How to debug it
- Verify the requested URL is correct
- Check server logs for the exact path requested
- Inspect route definitions for typos or omissions
- Test with a simple static file request
- Validate dynamic content generation logic
- Review reverse proxy/CDN cache settings
Return this code in your framework
Express (Node.js)
app.get('/missing', (req, res) => res.status(404).send('Not Found'));
FastAPI (Python)
from fastapi import HTTPException
@app.get('/missing')
async def missing():
raise HTTPException(status_code=404, detail="Not Found")
NestJS
@Get('missing')
findOne() {
throw new NotFoundException();
}
Go (net/http)
http.Error(w, "Not Found", http.StatusNotFound)
About HTTP 404
HTTP status code 404 Not Found is part of the
4xx Client Error family. The requested resource does not exist on the server. Understanding it is essential for
backend engineers, API designers, and anyone debugging integrations between services.
The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance:
what triggers them, how to debug them in production, and exactly how to return them from common
frameworks. Each code page is hand-curated and verified.