404 Not Found
Diagnose a 404 Not Found by checking the URL, deleted files, broken routes, redirects, permalinks, and server configuration.
Start here
Quick Answer
Confirm the URL first, then check whether the content, route, file, permalink, or redirect was moved. For site owners, trace the first wrong hop and add one clean redirect only when the content has a stable new location.
404 vs DNS failure vs server failure
A 404 means the server was reached, but the requested route, file, or resource was not available at that URL. That is different from DNS_PROBE_FINISHED_NXDOMAIN, where the browser cannot resolve the domain, and different from a 500 Internal Server Error, where the route exists but the application crashes while handling it.
Start with scope
| Situation | Likely cause | Next action |
|---|---|---|
| Only one URL fails | Deleted page, wrong slug, broken redirect target, or missing static file | Check the CMS route, redirects, and access log entry for that path. |
| All pages except the home page fail | Rewrite or permalink rules | Use the redirect, permalink, and rewrite guide. |
| The domain does not load anywhere | DNS or hosting issue, not a normal 404 | Check the DNS troubleshooting hub first. |
Useful log phrases
For a route-level 404, match the timestamp in the access log to a server log line. Examples include GET /old-page 404 or open() "/var/www/site/old-page" failed (2: No such file or directory). When those appear, collect the exact URL, referrer, redirect rule, and recent deploy or CMS change before editing configuration.
Diagnosis
Symptoms
- One page or asset returns 404 while the domain still loads.
- Old bookmarks, campaign links, moved posts, or renamed files fail.
- Server logs show a normal request with a 404 status.
Common causes
- The URL is mistyped, stale, or missing a trailing path segment.
- A page, post, file, or route was deleted or renamed without a redirect.
- Rewrite rules, permalinks, or front-controller fallback are misconfigured.
- A CDN or cache is serving an old route map.
Diagnostic Checklist
- Copy the exact URL and check it for typos.
- Test the parent path, canonical version, and one known-good page.
- Trace redirects one hop at a time.
- Check access logs and route or permalink settings.
Fixes
Check the exact URL and redirect chain
- 5 minutes
- Risk: low
- Anyone
- Browser
Separate a typo from a real missing route.
- Paste the URL into a plain text editor and check hostname, path, query string, and trailing slash.
- Try the parent URL and site search.
- Use browser developer tools or
curl -Ito see the first response.
You know whether the URL is wrong, moved, or genuinely missing.
If only old links fail, ask the site owner for the new URL or redirect.
The final URL should return 200 or a deliberate 404.
No rollback is needed for this read-only check.
Restore or redirect moved content
- 10-20 minutes
- Risk: medium
- Site owner
- CMS, web server
Fix moved pages without creating soft 404s.
- Find whether the content exists under a new slug.
- Restore accidentally deleted content if it should still be public.
- Add a 301 redirect from the old stable URL to the closest matching replacement.
- Do not redirect every missing URL to the home page.
Moved content resolves through one clean redirect or the restored page returns 200.
If there is no replacement, keep a proper 404.
Test the old URL, new URL, and sitemap entry.
Remove bad bulk redirects if they create loops or soft 404s.
Platform notes
In WordPress, resaving Permalink Settings can regenerate rewrite rules. In nginx, check try_files and front-controller fallback before editing application code.
FAQ
Is a 404 bad for SEO?
A real 404 is correct for content that no longer exists. It becomes harmful when important moved content lacks a useful redirect or internal links keep pointing at missing URLs.
Should all 404s redirect to the home page?
No. That creates soft 404s and confuses users and crawlers.
Review notes
- Last reviewed
- 2026-05-05
- Reviewed by
- FaultForge Editorial Team, Web operations reviewer
- Tested on
HTTP status checks, access and error log review, server response headers, recent deployment review, and safe rollback verification.