HTTP Status Codes and Messages: A Complete Reference

This comprehensive guide explains HTTP status codes and their meanings, categorized by class (1xx Informational, 2xx Success, 3xx Redirection, 4xx Client Error, 5xx Server Error). Learn to troubleshoot web server responses and understand the meaning behind common error codes like 404 Not Found.



HTTP Status Messages: Understanding Web Server Responses

When your browser asks a web server for something (like a webpage), sometimes things go wrong. The server might send back an "error code," like "404 Not Found." These aren't technically "HTML error messages," but rather HTTP status messages. Every request gets a response from the server, even if it's an error.

Common HTTP Status Codes

The most common successful response is "200 OK". Below is a list of common HTTP status messages grouped by category:

1xx: Informational

Message Description
100 Continue The server received the request headers and is waiting for the rest of the request.
101 Switching Protocols The client requested the server to switch to a different protocol.
103 Early Hints The server is sending hints to the browser about resources it can start loading early.

2xx: Successful

Message Description
200 OK The request was successful.
201 Created The request created a new resource (like uploading a file).
202 Accepted The request was accepted but processing isn't finished yet.
203 Non-Authoritative Information The information came from a different source, but the request was successful.
204 No Content The request succeeded, but there's no content to return.
205 Reset Content The request succeeded, there's no content, and the client should reset the display.
206 Partial Content Only part of the resource was returned (e.g., due to a range request).

3xx: Redirection

Message Description
300 Multiple Choices A list of links was returned; the client can choose where to go.
301 Moved Permanently The resource has permanently moved to a new URL.
302 Found The resource has temporarily moved to a new URL.
303 See Other The resource is available at a different URL using a GET request.
304 Not Modified The resource hasn't changed since the last request; the browser can use the cached version.
307 Temporary Redirect The resource has temporarily moved to a new URL.
308 Permanent Redirect The resource has permanently moved to a new URL.

4xx: Client Error

Message Description
400 Bad Request The request was poorly formatted.
401 Unauthorized Authentication is required but failed or was not provided.
402 Payment Required Reserved for future use.
403 Forbidden The client doesn't have permission to access the resource.
404 Not Found The resource could not be found.
405 Method Not Allowed The request method (GET, POST, etc.) is not allowed for this resource.
406 Not Acceptable The server can't return a format that the client accepts.
407 Proxy Authentication Required Authentication is required by the proxy server.
408 Request Timeout The server timed out waiting for the request.
409 Conflict There's a conflict related to the request (e.g., trying to update a resource that has changed).
410 Gone The resource is no longer available.
411 Length Required The "Content-Length" header is missing.
412 Precondition Failed A precondition in the request was not met.
413 Request Entity Too Large The request body is too large.
414 Request-URI Too Long The request URL is too long.
415 Unsupported Media Type The request's media type (e.g., file type) is not supported.
416 Range Not Satisfiable The client requested a part of a file that doesn't exist.
417 Expectation Failed The server couldn't meet a condition specified in the "Expect" header.

5xx: Server Error

Message Description
500 Internal Server Error A generic error occurred on the server.
501 Not Implemented The server doesn't support the request method.
502 Bad Gateway The server acting as a gateway got a bad response from another server.
503 Service Unavailable The server is temporarily unavailable.
504 Gateway Timeout A gateway timed out waiting for a response from another server.
505 HTTP Version Not Supported The server doesn't support the HTTP version used in the request.
511 Network Authentication Required Network authentication is required.