Fundamentals

HTTP status codes

Easy
10 min

HTTP status code is returned by the website, in each HTTP response. The status code informs the browser about the state of the website in relation to the browser's request. For example, if the browser requests a resource from the website that does not exist, the website can return the 404 Not Found - status code, informing the browser that the resource cannot be found. Status codes can be generally divided into five different categories.

  • 100 - 199 Informational Responses
  • 200 - 299 Successful responses
  • 300 - 399 Responses indicating redirection
  • 400 - 499 Responses indicating client errors
  • 500 - 599 Responses indicating errors on the website

Below are examples of each category:

102 Processing

This tells the browser that the webpage has received a request and is processing the response, but is not yet ready.

200 OK

This is one of the most common status codes that refers to a successful request. For example, if the request was a GET, where the browser has requested a resource and the website was able to successfully return this resource, the status code would logically be 200 OK.

302 Found

On a general level, status codes related to redirection instruct the browser to move to a different location. Redirections require both a status code and a Location-header in the response, which informs the browser where it should move to. 302 Found means that the requested resource has been temporarily moved to a different location and this may change in the future. Of course, this doesn't necessarily have to be true and it's up to the developers whether this will change in the future. In any case, whenever the browser sees a 302 status code and a Location header, it will move to the indicated location.

403 Forbidden

Status codes indicating customer errors tell the browser that the browser has made an error. For example, if the browser requests a resource that is not on the web page, or if the browser requests a resource that the user does not have permission to access. If the browser requests a resource for which the user's rights are insufficient, the browser returns a status code 403.

414 URI Too Long

This status code informs the browser that the requested URL is longer than what the website is willing to process.

429 Too Many Requests

The user has made too many queries within a certain time window.

500 Internal Server Error

The website has encountered a problem that it was unable to handle or resolve.

501 Not Implemented

If the browser sends an HTTP request using a request type that the website does not support, the website can return the corresponding status code.

hakatemia pro

Ready to become an ethical hacker?
Start today.

As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.