Fundamentals 6 min read

Understanding Common HTTP Status Codes: A Quick Reference Guide

This article provides a concise overview of the most frequently used HTTP status codes, explaining the meaning of each 1xx, 2xx, 3xx, 4xx, and 5xx series and detailing individual codes such as 200, 201, 301, 404, and 500 to help developers interpret server responses correctly.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Understanding Common HTTP Status Codes: A Quick Reference Guide

HTTP Status Code Categories

HTTP status codes are standardized numeric responses that a server returns to a client to indicate the result of an HTTP request. They are grouped into five classes, each covering a distinct type of outcome.

1xx – Informational

These codes signal that the request has been received and processing is continuing. They are rarely used in practice because HTTP/1.0 defined none, and most servers only send them under special circumstances.

2xx – Success

Indicates that the request was successfully received, understood, and accepted. The most common success codes are:

200 OK – The request succeeded and the response body contains the requested representation.

201 Created – The request resulted in the creation of a new resource. The server returns the new resource’s URI in the Location header.

202 Accepted – The request has been accepted for processing, but the processing has not been completed. The client may poll or be notified later.

3xx – Redirection

These codes tell the client that further action is required to complete the request, typically by following a different URI supplied in the Location header.

301 Moved Permanently – The resource has a new permanent URI. Clients should update bookmarks and future requests.

302 Found – The resource resides temporarily under a different URI. Clients should continue to use the original URI for subsequent requests.

304 Not Modified – The resource has not changed since the client’s last request. The server omits the response body, allowing the client to use its cached copy. This is usually triggered by conditional request headers such as If-Modified-Since or If-None-Match.

4xx – Client Error

These codes indicate that the request cannot be processed because of a client‑side problem.

401 Unauthorized – Authentication is required and has either not been provided or has failed. The server may include a WWW-Authenticate header describing the required authentication scheme.

403 Forbidden – The server understood the request but refuses to fulfill it. Authentication will not help, and the request should not be repeated.

404 Not Found – The requested resource does not exist on the server. If the resource has been permanently removed, the server may return 410 Gone instead.

5xx – Server Error

These codes signal that the server failed to fulfill a valid request due to an internal error or temporary condition.

500 Internal Server Error – A generic error indicating an unexpected condition, often caused by a bug in server‑side code.

503 Service Unavailable – The server is currently unable to handle the request due to overload or maintenance. Clients may retry after a delay, optionally guided by the Retry-After header.

504 Gateway Timeout – The server, acting as a gateway or proxy, did not receive a timely response from an upstream server.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Backend DevelopmentHTTPStatus Codesweb fundamentals
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.