404

HTTP Status Codes response

Look up HTTP status codes, their classes, and the usual causes behind the errors you meet most often.

status
HTTPstatus code
Tool Guide

What this tool does

An HTTP status code is a three digit number describing the outcome of a request. The first digit gives the class: 2xx for success, 3xx for redirection, 4xx for a client-side problem, and 5xx for a server-side problem. Knowing just that division already narrows down where to look during an incident.

A 4xx means the request itself is at fault: a wrong address (404), missing authentication (401), insufficient permission (403), or a malformed request (400). A 5xx means the request arrived correctly but the server could not fulfil it, whether through an application error (500), a bad response from an upstream server (502), an overloaded or unavailable service (503), or an upstream timeout (504).

401 and 403 are easy to confuse: 401 means the caller has not been identified, while 403 means the caller is identified but not permitted.

When to use it

Use it to check the meaning of a code during incident response, to choose an appropriate code while designing an API, to narrow down the cause behind a monitoring alert, or to document a response specification.

Input and output examples

Input 404
Output Not Found: the requested resource does not exist (4xx client error)

Typical causes are a typo in the path, a deleted resource, or a missing route.

Input 502
Output Bad Gateway: the gateway received an invalid response from an upstream server (5xx server error)

Usually a dead application process or a misconfigured proxy.

Input 401 versus 403
Output 401 means authentication required, 403 means authenticated but not authorised

Ask whether logging in fixes it (401) or whether permissions must change (403).

Notes and limitations

Real services often use codes loosely. Some APIs return 200 with an error described in the body, and some deliberately blur 403 and 404 for security reasons. Never rely on the code alone; read the response body and the server logs as well. Remember that 502 and 504 usually originate in a reverse proxy or load balancer rather than the application itself.

Frequently asked questions

What is the difference between 401 and 403?

401 means the request carries no valid credentials so the caller is unknown; 403 means the caller is known but lacks permission for that resource.

How do 502 and 504 differ?

502 means an upstream server returned an invalid response, while 504 means it did not respond in time. Suspect a crashed process for 502 and slow processing for 504.

Should I use 301 or 302?

Use 301 when the address has moved permanently and 302 for a temporary move. Note that 301 is cached by browsers and search engines and is hard to undo.

Copied