Uptimecat

HTTP status codes that matter for uptime

A website monitor makes a request and reads the status code first. Knowing what each code family means helps you decide what counts as down.

How a monitor uses the status code

Every HTTP response starts with a three digit status code. The first digit gives the family: 2xx means success, 3xx means redirect, 4xx means the request was refused or wrong, and 5xx means the server failed. A monitor compares the code with a list of accepted codes. If it matches, the check passes. If it does not, the check fails.

The usual default is to accept 200 to 299. In Uptimecat you can change the accepted ranges per monitor, follow or limit redirects, choose the method and send headers, as described on website monitoring.

Codes you will meet most often

CodeMeaningWhat it tells a monitor
200 OKThe request worked.Healthy, as long as the content is right. Use a keyword check to be sure.
204 No ContentSuccess with an empty body.Common for health endpoints and APIs. Healthy.
301, 308Permanent redirect.Fine if expected. Point the monitor at the final URL to save a hop.
302, 307Temporary redirect.Often a login or region redirect. Check where it leads.
401, 403Authentication needed or access denied.Often a firewall or bot rule blocking the checker, or a protected page.
404 Not FoundNo such resource.A broken deploy, a moved page or a typo in the monitor URL.
429 Too Many RequestsRate limit reached.Your checks, or other traffic, are hitting a limit. Slow down or allow-list.
500 Internal Server ErrorThe server hit an unexpected condition and could not fulfil the request.Often a fault in your code or its dependencies, but check the logs.
502 Bad GatewayA proxy got an invalid answer from the upstream.The app behind the load balancer or CDN is down or crashing.
503 Service UnavailableThe server cannot handle the request now.Overload or maintenance mode. Often temporary, still down for users.
504 Gateway TimeoutA proxy waited too long for the upstream.The app is hanging, often on a database or external call.

When to accept more than 2xx

Some endpoints answer correctly with a code outside 2xx. An API root that returns 401 without a token is working as designed. A legacy URL that always answers 301 is fine if the redirect is the thing you want to watch. In those cases, add the expected code to the accepted list for that monitor only.

Do not widen the list to hide a problem. If a page returns 403 to the checker, find out why. Usually a firewall or bot filter treats the check as unwanted traffic. Allow the checker or send a custom header your filter recognizes, then keep the strict list.

A 200 is not always healthy

Many applications return 200 for error pages. A content management system may show a friendly database error with a success code. A single page app may load its shell even when every API call fails. The status code alone cannot see this.

Two checks cover the gap. A keyword monitor looks for text that only appears when the page works, such as a product name or a footer line. A JSON query monitor reads a field in an API response, such as a status value that your health endpoint sets after checking its own dependencies.

Build a useful health endpoint

  • Return 200 only when the service can do real work, for example after a quick database query.
  • Return 503 when a required dependency fails, so the monitor and your load balancer agree.
  • Keep it fast and cheap, with no heavy queries, so frequent checks do not add load.
  • Do not expose secrets or internal host names in the response body.

Frequently asked questions

Should redirects be followed?

Usually yes, with a limit. Following redirects checks what a visitor sees. Monitor the final URL directly if you want fewer hops.

Why does the monitor see a code that my browser does not?

The checker sends a different user agent, has no cookies and comes from a data center address. Bot rules and geo rules can treat it differently.

Is 503 during maintenance an outage?

For users, yes. Schedule a maintenance window so planned work does not alert. Exclude it from SLA figures only where your contract allows.

Related

Open the dashboard

Sign in with your Google account to add a monitor and pick an alert channel. Access is currently limited to Moruk accounts; open sign-up is not available yet.

Sign in