HTTP Status Codes

Complete reference for all standard HTTP response status codes with detailed explanations, code examples, and fix solutions.

1xx Informational

2xx Success

3xx Redirection

4xx Client Error

400
Bad Request
The server cannot process the request due to malformed syntax or invalid request message framing.
401
Unauthorized
Authentication is required. The request lacks valid authentication credentials.
402
Payment Required
Reserved for future use. Originally intended for digital payment systems.
403
Forbidden
The server understood the request but refuses to authorize it.
404
Not Found
The server cannot find the requested resource. The URL may be incorrect or the resource deleted.
405
Method Not Allowed
The request method is not supported for the requested resource.
406
Not Acceptable
The server cannot produce a response matching the list of acceptable values in the request headers.
407
Proxy Authentication Required
The client must first authenticate itself with the proxy.
408
Request Timeout
The server timed out waiting for the request from the client.
409
Conflict
The request conflicts with the current state of the target resource.
410
Gone
The requested resource is no longer available and will not be available again.
411
Length Required
The server requires a Content-Length header in the request.
412
Precondition Failed
The server does not meet one of the preconditions specified in the request headers.
413
Content Too Large
The request body is larger than the server is willing or able to process.
414
URI Too Long
The URI provided was too long for the server to process.
415
Unsupported Media Type
The server refuses to accept the request because the media type is not supported.
416
Range Not Satisfiable
The requested range cannot be satisfied by the server.
417
Expectation Failed
The server cannot meet the requirements of the Expect request-header field.
418
I'm a teapot
The server refuses to brew coffee because it is a teapot. This is an April Fools' joke from RFC 2324.
421
Misdirected Request
The request was directed at a server that is not able to produce a response.
422
Unprocessable Content
The server understands the content type but was unable to process the contained instructions.
423
Locked
The resource that is being accessed is locked.
424
Failed Dependency
The request failed because it depended on another request that failed.
425
Too Early
The server is unwilling to risk processing a request that might be replayed.
426
Upgrade Required
The server refuses to perform the request using the current protocol.
428
Precondition Required
The origin server requires the request to be conditional.
429
Too Many Requests
The user has sent too many requests in a given amount of time (rate limiting).
431
Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large.
451
Unavailable For Legal Reasons
The server is denying access to the resource as a consequence of a legal demand.

5xx Server Error