HTTP 404 Not Found — What It Means and How to Fix It
A 404 status code means the server couldn't find the requested resource. Learn the common causes on both client and server side, and how to debug it.
Published September 20, 2026
HTTP 404 Not Found means the server is reachable but has nothing at the requested URL. Fix it by correcting the URL, restoring or redirecting the missing page, or fixing the routing configuration.
The concept
The server understood the request, looked up the path, and found no resource. It is a client-error status, in the 4xx family.
Common causes: a typo, a deleted or renamed page, a wrong base path, case-sensitive paths on Linux, missing rewrite rules for single-page apps, or a file that was never deployed.
Where a request can miss
Practical examples
Check what the server returns
curl -I https://example.com/missing
# HTTP/1.1 404 Not FoundRedirect a moved page (Nginx)
location = /old-page { return 301 /new-page; }SPA fallback (Nginx)
location / {
try_files $uri $uri/ /index.html;
}Return 404 from an Express route
app.get('/users/:id', (req, res) => {
const user = find(req.params.id)
if (!user) return res.status(404).json({ error: 'User not found' })
res.json(user)
})Common mistakes
- Redirecting every 404 to the homepage (a 'soft 404' that confuses search engines).
- Forgetting case sensitivity: /About ≠ /about on Linux.
- Deleting URLs without 301 redirects, losing SEO value.
- Using 404 for forbidden resources (that is 403).
Key takeaways
- 404 = nothing at that URL.
- Use 301 redirects for moved pages and 410 for permanently gone ones.
- Always serve a helpful custom 404 page.
FAQ
Does a 404 hurt SEO?
A few are normal; many broken internal links or lost backlinks are harmful, so redirect valuable URLs.
404 vs 410?
410 Gone tells crawlers the removal is permanent and deliberate.