HTTP 404 Not Found
The HTTP 404 Not Found error is the most recognized response code on the web. It means the server received the request, understood it, and looked for the resource — but nothing exists at that URL. This is not a server crash or a network failure. The server is running fine and responded deliberately: the resource is simply not there. Understanding 404 properly means knowing the difference between a hard 404 (the server genuinely returns 404), a soft 404 (the server returns 200 but the page signals missing content), and a custom 404 page (the visual error page served alongside the 404 response). Each has different implications for users, developers, and search engines.
Quick reference
| Code | 404 |
|---|---|
| Name | Not Found |
| Category | 4xx Client Errors |
| Specification | RFC 9110, Section 15.5.5 |
| Retrying | Retrying the same URL without changes will produce the same result |
| Caching | Cacheable by default — caches may store 404 responses unless told otherwise |
| Search engines | Google treats 404 as a soft signal; it may re-crawl before deindexing |
What HTTP 404 Not Found means
When a server returns 404 Not Found, it is telling the client three things: the request was received and understood, no resource matching the URL exists on this server, and the server makes no guarantee about whether the resource ever existed or might exist in the future. This last point is important — 404 is intentionally ambiguous about history. A URL returning 404 may have never existed, may have been deleted, or may have moved without a redirect. The server does not distinguish between these cases unless you explicitly use 410 Gone to signal intentional removal.
RFC 9110 permits servers to return 403 Forbidden instead of 404 when a resource exists but should not be revealed — for example, to avoid confirming whether a user account exists. This means a 404 does not always guarantee the resource never existed; it only guarantees the server is not serving it.
Hard 404 vs. custom 404 page
A hard 404 is when the server returns the HTTP status code 404 in the response headers. The HTML body can contain anything — it is commonly a styled error page with a message like "Page Not Found." That styled page is the custom 404 page. They are two different things: the HTTP status code travels in the headers, the custom page travels in the body. Search engines read the status code, not the body text, to determine whether a URL should be indexed.
Soft 404
A soft 404 is a page that returns HTTP 200 OK in the headers but renders content that signals the resource is missing — for example, "This product no longer exists" or an empty search result page at a URL like /search?q=nothing-here. Google actively detects soft 404s. When Googlebot sees a 200 response whose content looks like a missing-resource page, it may choose not to index that URL or may eventually delist it. Soft 404s are a significant source of wasted crawl budget on large sites.
Common causes of a 404 error
Broken or outdated link
The most common cause: an inbound link (from another page on your site, an external site, an email, or a social post) is pointing to a URL that has moved or been deleted. The link was valid when it was created but the target no longer exists.
Page deleted without a redirect
Content management systems often make it easy to delete a page without prompting to set a redirect. If a published URL is removed without a 301 Moved Permanently or 410 Gone response, every existing link to it will produce a 404. This is one of the most common causes of organic traffic loss after a site redesign or content audit.
URL structure changed
Changing a slug, moving a page to a different section, or switching URL patterns (e.g., /blog/post-title to /articles/2024/post-title) without redirect rules will break every existing inbound link. A site migration without comprehensive redirect mapping is the leading cause of mass 404 events.
Trailing slash inconsistency
Many web servers treat /about and /about/ as different URLs. If the server is configured to serve only one form but a link points to the other, the result is a 404. Nginx and Apache can be configured to normalize trailing slashes; many CDNs do this automatically.
Case-sensitive paths
Linux file systems (which serve most web servers) are case-sensitive. A file stored at /Products/Widget.html is not the same as /products/widget.html. If URLs were recently lowercased as part of an SEO cleanup, all old links with original casing will 404 unless redirects are in place.
Misconfigured routing in single-page apps
In React, Vue, Angular, or other SPA frameworks, client-side routing handles URL changes in the browser. But when a user visits a deep link directly (or Googlebot requests it), the server must return the application shell at that URL. If the server is not configured to fall back to index.html for all routes, deep links return a 404 from the file system instead of the app.
API endpoint not registered
In API development, a 404 from an endpoint can mean the route was never registered, the path parameter format does not match the route pattern (/users/{id} vs. /users/profile), or the resource with the requested ID does not exist in the database. The response body from a well-designed API will clarify which case applies.
How to diagnose and fix 404 errors
Find 404s on your own site
Google Search Console → Pages → "Not found (404)" lists URLs that Googlebot found returning 404. This is the most authoritative source for URLs with inbound link equity that are currently broken. Crawl your site with a tool like Screaming Frog, Sitebulb, or curl scripts to find all internal broken links as well.
Set a redirect for moved content
If the content still exists at a new URL, return a 301 Moved Permanently redirect from the old URL to the new one. This preserves link equity and prevents further 404s. Use 301 for permanent moves (the content will live at the new URL indefinitely) and 302 Found for temporary moves.
Return 410 for intentionally deleted content
If the content is gone for good and should not be replaced, use 410 Gone instead of 404. A 410 signals to search engines that the removal is intentional and permanent, which causes faster deindexing than a 404. This is especially useful for product pages, campaign landing pages, and deprecated API endpoints.
Fix your custom 404 page
Ensure your custom 404 error page actually returns HTTP 404 in the status code — not 200. Some CMS configurations or hosting setups incorrectly serve the error page with a 200 status, creating a soft 404. Verify with curl -I https://yourdomain.com/nonexistent-url and check the response code in the first line of output.
Avoid redirecting all 404s to the homepage
Bulk-redirecting 404 URLs to the homepage is a common mistake. Google treats these as soft 404s because the homepage is not a relevant response to the broken URL. This wastes crawl budget and passes no link equity. Only redirect to a page that genuinely replaces the missing content.
Fix SPA deep link routing
On Netlify, add a _redirects rule: /* /index.html 200. On Apache, add a .htaccess rewrite rule that serves index.html for any path that does not match an existing file. On Nginx, use try_files $uri $uri/ /index.html in your server block.
SEO and crawl implications
How Google handles 404
When Googlebot encounters a 404, it does not immediately remove the URL from the index. It re-crawls the URL at intervals to confirm the 404 is permanent before deindexing it. This means a 404 that gets fixed quickly (with a 301 redirect to the correct page) may result in no organic traffic loss at all, as the page may not have been deindexed yet.
Crawl budget and 404s
Sites with a high volume of 404 URLs waste crawl budget — Googlebot spends time requesting pages that return nothing useful. This is most damaging on large sites with hundreds of thousands of URLs. Clean up 404s through redirects or explicit 410 responses to recover crawl budget for pages that matter.
Soft 404 detection
Google is effective at detecting soft 404s — pages that return 200 but display thin or empty content. If your site has URL patterns that return a 200 with a "no results" or "not found" message, add a noindex meta tag to those pages, or better yet, fix the server to return the correct 404 or 410 HTTP status code. Never rely on a 200 response with error copy to suppress a URL from the index.
Monitoring 404s in Search Console
Google Search Console's Pages report, filtered to "Not found (404)", shows which URLs Googlebot attempted to crawl and received 404 responses. Prioritize URLs with external inbound links — these represent real link equity that is currently being lost. Fix these first with appropriate redirects.
How 404 differs from similar status codes
| Code | Name | Key difference from 404 |
|---|---|---|
| 400 | Bad Request | The request itself is malformed — the problem is the request syntax, not a missing resource. A 400 says "I cannot understand this," a 404 says "I understand, but there is nothing here." |
| 403 | Forbidden | The resource exists but access is denied. A 403 confirms the resource is present; a 404 makes no such claim. |
| 410 | Gone | The resource existed and has been permanently removed. A 410 is deliberate and explicit; a 404 is ambiguous about history. Search engines delist 410 URLs faster than 404s. |
| 500 | Internal Server Error | Something broke on the server side while trying to fulfill the request. A 404 means the server worked fine — it just found nothing. A 500 means the server failed before it could even determine whether the resource exists. |
| 301 | Moved Permanently | The resource has moved to a new URL permanently. The correct fix for a broken inbound link is often to 301-redirect the 404 URL to its replacement. |
For a detailed side-by-side breakdown, see the 404 vs 410 comparison, 403 vs 404 comparison, and 400 vs 404 comparison.
Frequently asked questions about HTTP 404
Does a 404 error mean the server is down?
No. A 404 means the server is running and responded correctly — it just could not find the resource at the requested URL. If the server were unreachable, you would see a connection error, a 502 Bad Gateway, or a 503 Service Unavailable response, not a 404.
What is a soft 404?
A soft 404 is a page that returns HTTP 200 OK but displays content indicating the resource is missing — for example, a "Page not found" message or an empty product listing. Google detects soft 404s and may choose not to index them. Returning the correct 404 status code in the HTTP headers fixes the signal.
Should I redirect all 404 pages to the homepage?
No. Redirecting broken URLs to the homepage creates soft 404 signals because the homepage is not a relevant replacement for the missing content. Google will detect this pattern and may devalue the redirect. Only redirect to a page that genuinely represents the moved or replaced content.
What is the difference between 404 and 410?
HTTP 404 means the resource was not found — it may or may not have existed before. HTTP 410 Gone is an explicit signal that the resource existed and has been permanently removed. Use 410 when you want search engines to delist the URL quickly and cleanly, without waiting for the re-crawl cycle that a 404 requires.
Can Google index a page if it returns 404?
If a page previously ranked and is now returning 404, Google will re-crawl it several times before removing it from the index. If the 404 is corrected (via a 301 redirect or by restoring the page) before Google deindexes it, the page may retain its rankings. Pages that have never been indexed and return 404 will not be indexed.
Related resources
Related status codes: HTTP 400 Bad Request · HTTP 403 Forbidden · HTTP 410 Gone · HTTP 301 Moved Permanently · HTTP 302 Found · HTTP 500 Internal Server Error
Comparisons: 404 vs 410 · 403 vs 404 · 400 vs 404 · 401 vs 404 · 404 vs 451
Guides: In-depth 404 Not Found guide · 410 Gone guide · 301 Moved Permanently guide
Browse by category: All 4xx Client Errors · Full Status Code Reference
Standards: Defined in RFC 9110, Section 15.5.5 · IANA HTTP Status Code Registry · MDN Web Docs — 404