ENES

HTTP status codes

The three-digit number a web server sends back to say how your request went.

A browser asks a server for a page and gets back a three-digit number; a legend groups 2xx as success, 3xx as redirect, 4xx as your mistake and 5xx as the server's mistake

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

Go deeper

Related terms

More in Networks