HTTP 404 Not Found — What It Means & How to Debug
HTTP 404 Not Found indicates the server cannot locate the requested resource — the URL path does not match any existing route, file, or endpoint.
What It Means
The HTTP 404 Not Found status code is the most recognizable error on the web. It tells the client that the server could not find a resource matching the requested URL. This could mean the page was deleted, moved without a redirect, the URL was typed incorrectly, or the link pointing to it was broken.
A 404 response can mean either the resource never existed or it existed and was removed. The server does not distinguish between these cases — it simply reports that it cannot serve anything at that URL. The response body often includes a custom error page, but some API servers return an empty body to avoid revealing information.
When It’s Sent
- Typo in the URL — the user types
exmple.cominstead ofexample.com - Deleted or moved page — the resource was removed without a redirect
- Broken links — another site links to a URL that no longer exists
- Missing API endpoint — a client calls
/api/v3/usersbut the API only has/v2 - Incorrect route parameter —
/users/99999where no user with that ID exists
Real Example
curl -v https://example.com/nonexistent-pageExpected response:
> GET /nonexistent-page HTTP/1.1
> Host: example.com
>
< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Content-Length: 162
<
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>Page Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body>
</html>How to Debug
Browser DevTools
- Open the Network tab
- Reload the page or trigger the navigation
- Look for the request with status
404in red - Click it and check the Request URL — verify the path is correct
- Check the Response tab for any error page or message
curl
curl -s -o /dev/null -w "%{http_code}" https://example.com/pageIf you get 404, verify the URL path. Use -I to check headers only:
curl -I https://example.com/pagePostman
Enter the URL and send a GET request. The status badge shows 404 Not Found in red. Verify the URL path, method, and base URL against the API documentation.
How to Fix
- Check the URL for typos — common mistakes: missing slashes, wrong case, misspelled words
- Verify the resource exists — log in to the server or CMS and check if the page/resource is published
- Add a redirect — if you moved the resource, set up a
301redirect from the old URL to the new one - Check the routing table — for web frameworks, verify the route is defined and not shadowed by another route
- Review .htaccess or Nginx config — URL rewriting rules might be blocking access
- Generate a sitemap — helps identify all live URLs and find gaps
Common Causes
| Scenario | What Happens | Why It Matters |
|---|---|---|
| Typo in URL | User types the wrong path | Redirect or spell-check the link |
| Deleted resource | Page removed without redirect | Set up a 301 to the closest related page |
| Broken external link | Another site links to a non-existent URL | Contact the site owner or add a redirect |
| Case sensitivity | /About vs /about mismatch on case-sensitive servers | Standardize URL casing |
| Missing API version | Client calls /v3/users but only /v2/users exists | Update the API client to the correct version |
FAQ
Related Codes
- HTTP 200 OK — the resource exists and loads correctly
- HTTP 301 Moved Permanently — how to redirect old URLs properly
- HTTP 403 Forbidden — resource exists but is hidden (sometimes servers return 404 instead of 403 for security)
- HTTP 500 Internal Server Error — the server failed while trying to serve the resource
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro