403 vs 404: Forbidden vs Not Found

Both status codes appear frequently in production traffic but communicate different intent.

Aspect403404
MeaningForbidden describes how the server processed the request and what the client should do next.Not Found describes how the server processed the request and what the client should do next.
Typical use caseHTTP 403 Forbidden indicates a client errors response outcome.HTTP 404 Not Found indicates a client errors response outcome.
Operational noteMonitor cache/client behavior when returning 403.Monitor cache/client behavior when returning 404.

When to use one vs the other

Choose the code that most accurately reflects semantics and expected client behavior.

FAQ

Can I swap these codes?

No. Returning the wrong code can break clients, SEO expectations, or caching behavior.

Related guides: 403 ยท 404