# HTTP status code

What is an HTTP status code?

An HTTP status code is the three-digit number a server puts at the start of every response. It tells a browser, a crawler or a monitoring check how the request went before any of the page arrives.

## How it works

The first line of a response carries the protocol version, the code and a short reason phrase:

```http
HTTP/1.1 503 Service Unavailable
Retry-After: 120
```

The first digit sets the class of the code, as defined in RFC 9110:

- 1xx informational: the request was received and the server is still working on it.
- 2xx success: the request worked, as with 200 OK.
- 3xx redirection: the client has to take a further step to finish the request, usually a request to another URL, as with 301 Moved Permanently or 302 Found.
- 4xx client error: something is wrong with the request itself, as with 403 Forbidden or 404 Not Found.
- 5xx server error: the request looked fine but the server could not answer it, as with 500 Internal Server Error or 503 Service Unavailable.

A client that does not know a specific code treats it as the x00 code of its class, so an unknown 471 is handled like a 400.

## Why it matters

Software reads the code, not the page. Caches decide what to store by it, crawlers decide whether a URL still exists, and an [uptime monitoring](/glossary/uptime-monitoring) check decides whether the site is up. A page that shows an error message to people but answers 200 looks healthy to all of them.

## What can go wrong

- A deploy or a restart leaves the application unable to answer for a moment, and the proxy in front of it returns 502 or 503.
- An error page answers 200 (often called a soft 404), so the broken URL stays in search results and no check notices.
- A redirect points at another redirect, or back at itself, and the browser gives up after too many hops.
- A firewall or bot protection answers 403 to automated requests, so a check from outside reports an error your own browser never sees.

## Check it

The [HTTP status & speed check](/tools/http-status) requests any URL once and shows the status code it answers with. To hear about a 5xx while it is happening, Ranetrace's [uptime monitoring](/features/uptime-monitoring) checks a site about every minute and alerts once it has been down for two minutes, so a single blip does not send an alert.

Read this definition in a browser: https://ranetrace.com/glossary/http-status-code
