The article explains the five classes of HTTP status codes, from 1xx (informational) to 5xx (server errors), describing each group's purpose and common examples like 200 OK, 404 Not Found, and 500 Internal Server Error.
Background
- **HTTP status codes** are three-digit numbers a web server sends back to a browser or API client after receiving a request. They tell the client whether the request succeeded, failed, or needs further action.
- The codes are grouped into five classes: **1xx** (informational), **2xx** (success), **3xx** (redirection), **4xx** (client error — you did something wrong), and **5xx** (server error — the site's servers messed up).
- Common examples: **200 OK** (everything worked), **301 Moved Permanently** (the page has a new URL), **404 Not Found** (the page doesn't exist), **500 Internal Server Error** (the server crashed).
- Knowing these codes is essential for debugging websites, writing reliable web scrapers or API integrations, and understanding what went wrong when a page fails to load. Tools like `curl`, browser DevTools, and monitoring services (e.g., urlwatch) surface these codes constantly.