404Not Found
The requested resource could not be found but may be available in the future.
What this code obliges you to do
Do not retry automatically
Repeating the same request produces the same result. A retry loop here just multiplies load and hides the real fault.
Cacheable by default
RFC 9110 lists this code as heuristically cacheable, so a cache may store it even with no Cache-Control header. Send explicit headers if that is not what you want.
Body allowed
You may return a payload explaining the outcome — for an error, a machine-readable problem document is worth the effort.
What usually causes it
3Broken hyperlinks
Deleted products/records
Server path misconfiguration
Effect on search
Normal part of web operation but causes ranking drops if high-value pages randomly disappear. 'Soft 404s' (returning 200 for a not-found page) severely harm SEO.
How to send it
2import { notFound } from 'next/navigation';
notFound();HttpResponse::NotFound().body("Page missing")Codes people confuse with this one
2Gone
Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed.
Bad Request
The server cannot process the request because the client sent invalid syntax, malformed JSON, missing fields, or headers the endpoint cannot accept.