The Most Common HTTP Status Codes and Their Meanings

Zac Geekie
WebWhip
Published in
4 min readMay 11, 2021
404 Page Not Found HTTP status code

Every time a user visits a webpage or downloads a file from the Internet, their browser sends a request to the web host (the server where the page/file is located) asking for the data. This is called an HTTP (Hypertext Transfer Protocol) request. The server then processes the request and sends back a response.

The server response contains two parts: an HTTP header and a body. The header component contains fields with pertinent technical information, while the body contains the user-requested data (webpage or file). Header fields are automatically interpreted by the user’s browser and are normally not visible to the user.

One of the most important fields in the HTTP header is the “Status” field. The HTTP status is a code (number) followed by a descriptive phrase, example: “200 OK”. The status code tells the browser if the request was successful or if there was a problem with it. Below are the most common HTTP response status codes alongside their meanings.

Important Definitions

  • Resource: A web resource can be a web page (html) or any other type of file (photo, video, Java application, PDF, etc.)
  • Client: A user client is a program, e.g. a web browser, which is used to access (request) a web resource.
  • Host: The web host is the server where the requested resource is located (hosted).

Frequent HTTP Status Codes Explained

  • 100 Continue: The server has received the HTTP request headers from the client and the request is acceptable. The client should proceed with the request and send its body (if any).
  • 200 OK: The typical response to an HTTP request, which means that the request has been received and processed successfully. The response will normally include the requested resource in its body.
  • 301 Moved Permanently: The resource has been permanently moved to a new URI provided in the “Location” field.
  • 302 Found: Used to temporarily redirect the request to another URI indicated in the “Location” field.
  • 303 See Other: The resource should be accessed by a different URI given in the “Location” field using a GET method regardless of the method used in the original request.
  • 304 Not Modified: This status code is returned when the client has sent a request with the If-Modified-Since field specified and the resource hasn’t been modified since the specified date. In this case the client can use a cached version of the page or file without having to re-download it from the server, thus saving time and bandwidth.
  • 307 Temporary Redirect: The client needs to send the HTTP request again using the URI provided in the “Location” field. The original URI should still be used for all future requests.
  • 400 Bad Request: The client sent an HTTP request that is invalid or does not comply with HTTP standards.
  • 401 Unauthorized: Returned if the client has not authenticated itself, or failed to do so, when trying to access a resource that requires authentication (a username and a password).
  • 403 Forbidden: The client has been denied access to the resource even though the request was valid.
  • 404 Not Found: The typical error code that web hosting servers return when the requested resource has not been found on the server. This could be because the resource has been removed or the client used a broken/invalid link.
  • 405 Method Not Allowed: The client used the wrong method in the request. For example, GET instead of POST.
  • 408 Request Timeout: The client has taken too long (depending on the server’s configurations) to send the request and so the server timed out.
  • 410 Gone: Means that the resource used to exist on the server, but it no longer does. Unlike 404 Not Found, the 410 Gone status indicates that the resource will not be available again in the future.
  • 415 Unsupported Media Type: This status code is returned when the media type defined in the Content-Type field of the request header is not supported or accepted by the server.
  • 500 Internal Server Error: An error has occurred within the server. Many things could go wrong with the server’s applications and result in this error code.
  • 502 Bad Gateway: This error message is returned when one of the intermediate (gateway or proxy) servers has received a bad response from the upstream server in the path between the client and the web host.
  • 503 Service Unavailable: Indicates that the server is temporarily unavailable or unable to process the request, usually because of an ongoing server maintenance or update, but could also be caused by overloading and other problems.
  • 504 Gateway Timeout: An intermediate (gateway or proxy) server that is used to access the resource did not receive a timely response from the upstream server.
  • 509 Bandwidth Limit Exceeded: The server cannot complete the request because the website where the resource is located has exceeded its bandwidth (data transfer) limit and thus is unable to receive/send any further data.

--

--

Zac Geekie
WebWhip

A seasoned geek who has been sailing the wild seas of the Word Wide Web for so many years. Always learning and trying to share some of my knowledge with others.