404 - Not Found
HTTP 404 Not Found means the origin server did not find a current representation for the target URI.
Last reviewed: February 12, 2026|Editorial standard: source-backed technical guidance
What Does Not Found Mean?
This status breaks user journeys and API chains because the requested URI cannot currently resolve to a usable representation at this scope.
Common Causes
- -Requested route or resource ID does not exist in target environment.
- -Resource was deleted, moved, or never created.
- -Proxy rewrite rules send traffic to a non-existent upstream path.
How to Fix Not Found
- 1Verify the resource path and identifier first, because 404 can be temporary or scope-related.
- 2Refresh stale links or IDs and align callers to the canonical resource path.
- 3Retest dependent routes after reconciling moved or migrated resources.
Step-by-Step Diagnosis for Not Found
- 1Capture the exact URI, identifier, and request scope that produced Not Found (404).
- 2Verify resource existence and lifecycle state in the same environment and namespace.
- 3Check whether the resource was intentionally hidden behind 404 instead of 403 by policy design.
- 4Differentiate temporary lookup gaps (404) from intentional retirement flows where 410 is more accurate.
Resource Identity and Scope Audit
- -Inspect canonical resource identity and tenant scope before debugging routing (example: `/v1/users/123` exists only in `tenant-a`, but request uses `tenant-b`).
- -Trace identifier provenance from source system to API call chain (example: stale ID from cache after record merge).
Routing and Lifecycle Reconciliation
- -Review rewrite, redirect, and version routing rules for path drift (example: old `/api/v1` endpoint removed during `/api/v2` cutover).
- -Correlate delete/move events with request timestamps to confirm lifecycle intent (example: content archived and replaced with a new slug).
Implementation Examples
curl -i -X GET https://api.example.com/v1/users/999999
# Response:
# HTTP/1.1 404 Not Found
# {"error":"Not Found","code":"404"}const response = await fetch('https://api.example.com/v1/users/999999', {
method: 'GET',
headers: { 'Accept': 'application/json' }
});
if (response.status === 404) {
console.error('Handle 404 Not Found');
}import requests
response = requests.get(
'https://api.example.com/v1/users/999999',
headers={'Accept': 'application/json'}
)
if response.status_code == 404:
print('Handle 404 Not Found')How to Verify the Fix
- -Repeat the request and confirm 404 is resolved for valid resource identifiers.
- -Validate downstream links and dependent operations now resolve the same canonical resource.
- -Check logs for residual stale-link or stale-identifier traffic after rollout.
How to Prevent Recurrence
- -Use canonical resource identifiers and route generation helpers across clients.
- -Add broken-link and stale-route checks to CI and post-deploy validation.
- -Automate cleanup and migration playbooks for moved or retired resources.
Pro Tip
- -emit link-integrity jobs that crawl production APIs with real tenant scopes, because synthetic single-tenant checks miss many 404 regressions.
Decision Support
Compare Guide
403 Forbidden vs 404 Not Found: When to Hide Resources
Use 403 for explicit access denial, or 404 to conceal resource existence when security policy requires reducing endpoint and object enumeration risk.
Compare Guide
404 Not Found vs 410 Gone: Missing vs Permanent Removal
Learn when to return 404 (missing or temporary absence) versus 410 (intentional permanent removal), including redirect and cache implications.
Playbook
Resource State Playbook (404 / 410 / ResourceNotFound)
Use this playbook to separate temporary missing-resource lookups from permanent removals, then fix scope, lifecycle, and identifier drift safely.
Official References
Provider Context
This guidance is specific to HTTP services. Always validate implementation details against official provider documentation before deploying to production.