Common HTTP Error Codes

3 minute read

Published:

When there are too many visitors to the server, the following error might appear on your browser.


What we most often encounter is HTTP 4xx and 5xx. So what do they mean?

HTTP 4xx -> Client Errors

Status CodeNameReason
400Bad RequestThe request syntax is incorrect, and the server cannot understand it.
401UnauthorizedThe user has not been authenticated, and valid credentials are missing.
403ForbiddenThe user is authenticated but does not have sufficient permissions.
404Not FoundThe requested resource does not exist (URL error or resource removed).
405Method Not AllowedAn HTTP method that is not allowed was used.
408Request TimeoutThe server timed out waiting for the request.
409ConflictThe request conflicts with the current state of the resource.
413Payload Too LargeThe request payload is too large, exceeding the server’s size limit.
414URI Too LongThe requested URI is too long, exceeding the server’s processing capacity.
429Too Many RequestsThe request rate is too high, triggering the server’s rate limit.

HTTP 5xx -> Server Errors

Status CodeNameReason
500Internal Server ErrorAn unknown internal error occurred on the server.
501Not ImplementedThe server does not support the requested functionality or method.
502Bad GatewayThe gateway or proxy server received an invalid response from upstream.
503Service UnavailableThe server is temporarily unavailable (e.g., overloaded or under maintenance).
504Gateway TimeoutThe gateway or proxy server did not receive a timely response from upstream.
505HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request.

In addition to 4 and 5, HTTP status codes also include other categories. The complete HTTP status code is divided into five categories, each of which has a specific purpose and meaning.

Other Categories of Code

1xx Informational Responses

Status CodeNameReason
100ContinueThe client should continue sending the remainder of the request.
101Switching ProtocolsThe server agrees to switch protocols (e.g., from HTTP to WebSocket).
102ProcessingThe server is processing the request but has not yet completed it.
103Early HintsProvides early hints to help the client preload critical resources.

2xx Successful Responses

Status CodeNameReason
200OKThe request was successful, and the response contains the requested data.
201CreatedThe request was successful, and a new resource was created.
202AcceptedThe request has been accepted but has not yet been processed.
204No ContentThe request was successful, but there is no content to return.
206Partial ContentThe server is returning only part of the resource (used for range requests).

3xx Redirection Messages

Status CodeNameReason
300Multiple ChoicesThe resource has multiple options, and the client needs to choose one.
301Moved PermanentlyThe resource has been permanently moved to a new location.
302FoundThe resource is temporarily located at a different URI.
303See OtherThe response can be found under a different URI (often used after POST).
304Not ModifiedThe resource has not been modified; the client can use its cached version.
307Temporary RedirectThe resource is temporarily located at a different URI (method unchanged).
308Permanent RedirectThe resource has been permanently moved to a new location (method unchanged).

Related information come from Blogs on CSDN and Qwen