Skip to content
BENIBIX Learn

HTTP Status Code

Infrastructure🌐 NetworkingRequests and Responses

Also known as Status Code, Response Code, 404, 500

A number with three digits in each reply. It says how the request went.

Think of it like

Think of it like a traffic light for a web page. One quick sign tells you if it went well.

Example

Jack deletes an old page. Visitors now get 404 Not Found, so Jack sets a 301 that sends them to the new page.

Why it matters

The code tells you at a glance whose fault an error is: the request or the server.

Definition

An HTTP status code is a three-digit number at the start of each response. It says how the request went. The first digit gives the group. 2xx means it worked, 3xx means look somewhere else, 4xx means the request was wrong and 5xx means the server failed. The best known are 200 OK, 301 Moved Permanently, 404 Not Found and 500 Internal Server Error. Browsers, apps and search engines all act on these numbers.

Example code

http
HTTP/1.1 404 Not Found
The page asked for does not exist on this server.

Common mistake

Using 302 when a page has moved for good. Search engines keep the old address. Use 301 instead.

Key takeaways

  1. 1
    Three digits. The first gives the group.
  2. 2
    4xx versus 5xx. Your request or the server.
  3. 3
    Machines act on it. Browsers and search engines.

Learn it properly