Status codes

Why do websites show 404, 403 and 500?

Demo 1 of 7Reel"Bakit may 404, 403, at 500 sa websites?"

Try it

Pick a code and send a real request for it. 4xx codes blame the request, 5xx codes blame the server.

GET /api/lab/status/404

2xxWorked

3xxMoved

4xxYour side

5xxTheir side

Asks the server for 404 Not Found

History

Nothing sent yet. Pick a code and send it.

What just happened

Every time your browser asks a server for something, the server answers with a three-digit number before anything else. The first digit tells you what kind of answer it is.

The 200s mean it worked. The 300s mean the thing moved, and your browser follows it on its own. The 400s mean the request was the problem, like a page that isn't there (404), a page you aren't allowed to see (403) or asking too often (429). The 500s mean the server itself broke.

That split is the useful part. A 4xx is something you can fix by changing what you ask for. A 5xx is something only the people running the site can fix.

Where you've seen it

  • A link to a post that was taken down
  • A page behind a login you don't have
  • A shop that falls over in the first minute of a big sale

Keep going