HTTP status codes and Cloudflare errors: what 403, 404, 429, 500, 503 and 521 mean

Updated:

Every answer from a web server starts with a three-digit status code. Browsers usually hide it when all is well and show an error page when it is not. The code says a lot about what is going on: whether the site is up, whether it refused the request, or whether the server itself is in trouble. This guide covers the codes you are most likely to meet, as defined in RFC 9110, the HTTP standard, plus the codes Cloudflare adds for sites behind it.

The five classes

The first digit gives the class, and the class alone already answers the question “is the site up?”.

CodesClassIs the site up?
100–199Informational: the request was received and is being processedYes. Browsers handle these without showing them.
200–299Success: the request workedYes.
300–399Redirection: the page is at another addressYes, as long as the redirects end on a page.
400–499Client error: the request was refused or cannot be metYes. The server answered, but not with the page.
500–599Server error: the server failed to answer properlyNot usable. The server or something behind it has a problem.

Success and redirects

Redirects become a problem when they never end. If address A sends to B and B sends back to A, the browser gives up with an error such as ERR_TOO_MANY_REDIRECTS. A common cause is a site set to force https while a proxy in front of it talks to the server over http, or the other way round.

Client errors: the server answered, but refused

All of these show that something is answering for the site, although behind a content delivery network such as Cloudflare the answer may come from the network rather than from the site’s own server. For a status checker, 403 and 429 are especially common: many sites refuse automatic requests from data centres while serving people normally.

Server errors: the site has a problem

Many sites sit behind a proxy, a load balancer or a content delivery network, so 502 and 504 often mean that this front part works while the application behind it does not.

Cloudflare’s own codes

Cloudflare sits between visitors and many websites’ own servers, called the origin. When the origin fails, Cloudflare answers with a code of its own and an error page that says whether the problem is in the browser, at Cloudflare or at the host. These are the ones Cloudflare documents:

CodeWhat it means
520The origin returned an empty, unknown or unexpected answer.
521The origin refused the connection from Cloudflare, usually because the web server is off or a firewall blocks Cloudflare.
522Cloudflare timed out connecting to the origin: no reply to the connection within 19 seconds, or no acknowledgement of the request within 90 seconds.
523Cloudflare cannot reach the origin, usually because no network route leads to its IP address.
524Cloudflare connected, but the origin did not send an HTTP answer within the 125-second default timeout.
525The secure (SSL/TLS) handshake between Cloudflare and the origin failed.
526Cloudflare could not validate the origin’s SSL certificate.
530Cloudflare cannot resolve the origin’s host name. The page also shows a 1xxx error with more detail.

In all of these, Cloudflare is working and the problem is at the site’s own server, so only its owner or host can fix it. Cloudflare can also answer with a bot check instead of the page. That answer means the site is protected, not down, and Cloudflare marks it with a cf-mitigated: challenge header that checkers can recognise.

Which codes mean a site is down

Is it down?

Frequently asked questions

Is a 404 error my fault?

Usually not. The site works but has nothing at that address, because the link is old or mistyped or the page was removed. Check the address, or start from the home page.

What is the difference between 502, 503 and 504?

502 means a gateway got an invalid answer from the server behind it, 503 that the server cannot take requests right now, often because of overload or maintenance, and 504 that the gateway waited too long for an answer.

Why does a site show 403 to a checker but open in my browser?

Many sites block automatic requests from data centres, or ask for a bot check that only a real browser can pass. The 403 shows that something is answering for the site; behind a CDN such as Cloudflare it may come from the CDN rather than the site’s own server.

Is error 521 Cloudflare’s fault?

No. It means the site’s own server refused the connection from Cloudflare. Cloudflare is working; the owner or host has to bring the server back or let Cloudflare’s addresses through the firewall.

Previous in the series ← Is a website down, or is it just you? How to check, step by step

References

  1. RFC 9110 — HTTP Semantics (June 2022)
  2. RFC 6585 — Additional HTTP Status Codes (April 2012)
  3. RFC 7725 — An HTTP Status Code to Report Legal Obstacles (February 2016)
  4. Cloudflare — Troubleshooting Cloudflare 5XX errors
  5. Cloudflare — Detect a Challenge Page response

Related guides