Status Codes

Status Codes

  • In the HTTP response that is sent to a client, the status code, which is a three-digit number, is accompanied by a reason phrase (also known as status text) that summarizes the meaning of the code

  • Along with the HTTP version of the response, these items are placed in the first line of the response, which is therefore known as the status line.

  • The status codes are classified by number range, with each class of codes having the same basic meaning

  • The range 100-199 is classed as Informational

    • 200-299 is Successful

    • 300-399 is Redirection

    • 400-499 is Client error

    • 500-599 is Server error

Check out HTTP Status Dogs for a fun way to learn the different status codes


Exercise: See example of 404 Status Code

  • 404 means resource not found

  • Let’s see an example of how some websites handle situations where users try to navigate to a page on their site that doesn’t exist

  1. Try navigating to the following url: https://github.com/okokwhatupareyouthere

  2. Open up your developer tools and navigate to the “Network” tab; see if you can find the 404 response returned from Github’s servers