Skip to content
BENIBIX Learn

HTTP Status Codes

Level 4 · HTTP, the language of the web

How to read the three-digit code on every HTTP response. What 200, 301, 404 and 500 mean, and whose job it is to fix each group.

Course contentsLesson 11 of 13

After this lesson you can

  • Read the first digit of a code
  • Name the common codes and what they mean
  • Say who must fix a 4xx and a 5xx

10 mincovers 1 glossary entries

Worth reading first: HTTP Requests and Responses

What the first digit of the code tells you

Every HTTP response starts with a status code: three digits that say how the request went. The first digit is the one to read first. A 2 means it worked. A 3 means look somewhere else. A 4 means the request was wrong. A 5 means the server broke. The other two digits give the detail.

The 2xx codes are good news. 200 OK means here is what you asked for. 201 Created means a new thing was made, which is the usual answer to a POST. 204 means it worked and there is nothing to send back.

The 3xx codes send you elsewhere. 301 means the page has moved for good, and the new address is in a header. Browsers follow it on their own. 304 means nothing has changed since last time, so use the copy you already have.

The 4xx codes mean the asker must fix something. 404 Not Found is the famous one: no page lives at that address. 401 means you need to log in. 403 Forbidden means you are logged in but not allowed. 429 means you sent too many requests too fast.

The 5xx codes mean the server's owner must fix something. 500 is a crash in the server's own code. 502 and 504 mean a server in front could not get an answer from the one behind it. 503 means the server is too busy or shut for repair.

The code is for programs as much as for people. A search engine drops a page that returns 404 for long. A monitor that checks a site every minute raises an alarm on a run of 5xx codes. So the code has to be right, not just the page.

A common mistake is to show an error page with a code of 200. It looks fine to a person, but every program reads it as success. Search engines then keep a broken page, and monitors never notice the fault. An error page should carry the error's real code.

The codes you will meet most

CodeNameWhat it means
200OKHere is what you asked for
201CreatedA new thing was made
301Moved PermanentlyIt lives at a new address now
404Not FoundNothing lives at that address
403ForbiddenYou may not have it
500Internal Server ErrorThe server's code crashed
503Service UnavailableToo busy, or shut for repair
Read the first digit, and you already know whose job the fix is.

Worked example

A blog moves to a new address

Emma moves her blog from /posts/42 to /blog/how-to-bake. Old links all over the web now hit a 404.

She adds a 301 from each old address to its new one. Visitors land on the right post, and search engines move the old page's ranking to the new address.

The words for this lesson1

Check yourself

A site returns a 503 code. Who needs to fix it?

Finished this lesson?

Marking it complete also marks its 1 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.