Beamfar

What is an HTTP status code?

An HTTP status code is the three-digit number at the start of a server’s response that says how the request went. RFC 9110 defines the classes: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.

Definition
HTTP status code
The three-digit number in an HTTP response that says how the request went: 2xx success, 3xx redirect, 4xx client error, 5xx server error.

The ones that matter most

200 means the request succeeded. 301 and 308 are permanent redirects; 302 and 307 are temporary. 404 means nothing was found at that URL, 410 that it has gone for good. 500 means the server failed, 502 and 504 that a proxy could not reach the application in time, and 503 that the service is temporarily unavailable, which is the right code for a planned maintenance page.

How an uptime check reads them

A check normally counts 2xx as up and 5xx as down. The 4xx codes need a decision per URL: a 401 or 403 on a page that should be public, or a 404 on the home page, is an incident, while a 404 on an address that was never meant to exist is not. A 429 says the server is limiting the requester, which is information about the check, not about the site. Write down which codes count as up for each important URL instead of accepting “anything below 400”.

The limit of a status code

It describes the protocol exchange, not the page. A server can answer 200 with an empty page, an error message or the wrong site. That is why uptime checks should also verify content.

An example

curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" http://example.com/ prints the status of the first response and where it redirects, for instance 301 https://example.com/. A check that follows redirects should record both the first status and the final one: a 200 after four hops tells a different story from a 200 at the first request, and a 200 whose page says “not found” is a soft 404.

What to check

That each important URL returns the status you expect, that error pages return error codes and that maintenance pages return 503.

Sources

Read on . Standards and vendor pages change; confirm the current text before you rely on it.

Guides that use this term

  • Soft 404A soft 404 is a page that looks like an error or is empty but returns a success status. How Google reports it and how to catch error pages that answer 200.
  • RedirectA redirect is an HTTP response that sends a visitor or crawler to another URL. The permanent and temporary status codes and how Google treats each.
  • Uptime monitoringUptime monitoring requests a website from outside at intervals and alerts when it fails to answer. What it measures, what it misses and how it is confirmed.

Know first. Know why. Tell your client before they call.

Paste your client list. Both regions start checking.

No card for the trial.