HTTP status codes
The three-digit number a web server sends back to say how your request went.
Every time your browser or an app asks a server for something over HTTP, the answer starts with an HTTP status code: a three-digit number that sums up what happened. Most of the time you never see it, because it is 200 OK and the page simply loads. You notice it when something goes wrong, like the famous 404 Not Found.
The first digit tells you the family. 2xx means success. 3xx means the thing moved and the browser should go look elsewhere, like 301 Moved Permanently. 4xx means the problem is on the client's side: a wrong URL (404), a missing login (401), no permission (403), too many requests in a row (429). 5xx means the server failed: 500 Internal Server Error is a bug or crash, and 503 Service Unavailable usually means it is overloaded or down for maintenance.
For developers these numbers are a shared language. Monitoring tools count how many 5xx a site returns to detect outages, search engines read 301 to know a page moved, and an API uses them to tell a program exactly why its request was rejected.
Keep in mind
- 2xx success, 3xx redirect, 4xx client error, 5xx server error.
- 404 means the address points to nothing; it is not a server crash.
- 500 and 503 mean the problem is on the website's side, not yours.
- APIs use status codes so programs know why a request failed.