Mastering HTTP Status Codes: A Complete Guide to 1xx–5xx Responses

This article explains what HTTP status codes are, categorizes them into informational, success, redirection, client error, and server error groups, and details the most common codes with examples and usage scenarios.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Mastering HTTP Status Codes: A Complete Guide to 1xx–5xx Responses

What are HTTP Status Codes

HTTP status codes are three‑digit numbers returned by a server to indicate the result of a client’s request. They consist of the numeric code and a reason phrase (e.g., 200 OK, 404 Not Found).

Categories

1xx – Informational : Request received and processing continues.

2xx – Success : The request was successfully received, understood, and accepted.

3xx – Redirection : Further action is needed to complete the request.

4xx – Client Error : The request contains bad syntax or cannot be fulfilled.

5xx – Server Error : The server failed to fulfill a valid request.

2xx – Success

200 OK : Standard response for successful HTTP requests.

204 No Content : The server successfully processed the request but returned no body.

206 Partial Content : Used for range requests; the server returns only the specified part of the resource, indicated by the Content-Range header.

3xx – Redirection

301 Moved Permanently : The resource has a new permanent URI.

302 Found : The resource resides temporarily under a different URI.

4xx – Client Errors

400 Bad Request : The request syntax is malformed.

401 Unauthorized : Authentication is required and has failed or not been provided.

403 Forbidden : The server understands the request but refuses to authorize it.

404 Not Found : The requested resource could not be found, often due to an incorrect URL.

5xx – Server Errors

500 Internal Server Error : The server encountered an unexpected condition that prevented it from fulfilling the request.

503 Service Unavailable : The server is currently unable to handle the request due to overload or maintenance.

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.

HTTPWeb DevelopmentStatus CodesNetwork Protocols
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.