← Lessons

quiz vs the machine

Silver1110

Networking

The HTTP Status Code Families

What the leading digit of a response code tells you.

4 min read · intro · beat Silver to climb

Five Ranges by First Digit

Every HTTP response carries a three digit status code. The first digit sorts codes into five families, so a client can react sensibly even to a code it has never seen.

The Families

  • 1xx informational means the request was received and processing continues, such as 100 Continue.
  • 2xx success means the request succeeded, such as 200 OK or 201 Created.
  • 3xx redirection means more action is needed, such as 301 Moved Permanently.
  • 4xx client error means the request was faulty, such as 404 Not Found.
  • 5xx server error means the server failed, such as 500 Internal Server Error.

Reacting by Family

A robust client routes on the first digit first. A 4xx tells it to fix the request, while a 5xx tells it the request may be fine and a retry could help. This is why precise codes matter for automation.

Key idea

The leading digit of an HTTP status code groups responses into informational, success, redirection, client error, and server error, letting clients react even to unfamiliar codes.

Check yourself

Answer to earn rating on the learn ladder.

1. What does a 4xx status code indicate?

2. A retry is most likely to help after which family of codes?