HTTP status code
A three-digit number with which the web server indicates for every request whether it succeeded, and if not, roughly what the problem was.
In plain terms
When you open a website, your browser sends a request to a remote machine, the server. The server returns a three-digit number with every response: this is the status code. You usually do not see it because if everything is fine, the browser simply displays the page.
It is like a postman's note on a returned letter: 'addressee moved', 'addressee unknown', 'refused delivery'. It does not concern the letter's content but the fate of the item. The status code also indicates successful delivery.
The first digit is key. Codes starting with 2 indicate success, 3s indicate redirection, 4s indicate a problem with the request (wrong address, missing permission), and 5s indicate server errors. The most famous is 404: the requested page is not found.
In the AI era, these codes have become even more important because AI agents and programs do not look at the screen but decide from these numbers whether the operation succeeded, whether to retry, or whether to notify a human.
How it works
- The client (browser, mobile app, or an AI agent) sends a request to the server: for example, requesting a page or submitting a form.
- The server attempts to fulfill the request and writes the status code into the response. In older HTTP/1.1, a short text label is added next to the code, such as '200 OK' or '404 Not Found'. Newer HTTP/2 and HTTP/3 send only the number.
- The first digit of the code indicates the group: 1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error.
- The client acts based on the code: it displays content, follows redirects, requests login, or shows an error message.
- Programs and agents attach rules to status codes. On a 429 (too many requests), they wait, preferably as long as the server asks, and then retry. On a 401, they re-authenticate. On a 500, they log the error and raise an alert.
An everyday example
You click a link to an old article and see: "404 – Page not found". This is an HTTP status code: the server is alive and responding, but nothing exists at that specific address. However, if you receive a "503" during a ticket-buying rush, the server is overloaded, and it is worth trying again later.
Who is affected
A common misconception
Limits and risks
- The code only states broadly what happened; the exact cause is revealed by the response text or the server log.
- Not all services use it correctly: a system may send a '200 OK' while the response text contains an error message.
- An agent that only checks the status code may believe a failed operation was successful, so it must also verify the content of the response.
- Detailed error messages can provide useful information to attackers, so servers sometimes intentionally keep responses brief. For example, they may return '404' instead of '403' for forbidden content to avoid revealing its existence.
Similar, but not the same
- Error message – An error message is a text explanation for humans, while the status code is a standardized number interpreted primarily by programs, and it can also indicate success.
- exit code – An exit code signals success or failure when a locally running program ends; an HTTP status code is part of the response to a network request.
- HTTP method – The method (e.g., GET or POST) specifies what the client requests, while the status code indicates the result of that request.
Related concepts
HTTP, Communication protocol, Web standard
404-es hiba, Redirection, Szerverhiba, Request limit exceeded
A brief history
Status codes appeared in the early years of the web along with the HTTP protocol: they already appeared in descriptions from the early 1990s. The 1996 RFC 1945 documenting HTTP/1.0 established the three-digit code system, and the 1xx group was added with HTTP/1.1 (1997). Their current definition is contained in the RFC 9110 standard issued in 2022.
Where things stand
By the end of 2026, the web and virtually every online service are fundamental, stable components that have existed for decades. Their new role is that AI agents also gather information from these codes when independently invoking services.
Also known as
HTTP status code · HTTP status code · status code · response code · HTTP error code · HTTP status code · HTTP response code · status code
Sources
- RFC 9110: HTTP Semantics (IETF)
- MDN Web Docs: HTTP response status codes
- Wikipedia: List of HTTP status codes
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.