HTTP Status Codes

Updated Oct 29, 2020 · 6 min read

What are HTTP status codes?

HTTP response status codes (or HTTP status codes for short) are three-digit numbers that indicate whether an HTTP request has been completed successfully. It’s important to familiarize yourself with the different status codes to help you troubleshoot issues with your requests.

HTTP status codes are grouped into the following categories:

  • Informational responses (100–199)
  • Successful responses (200–299)
  • Redirects (300-399)
  • Client errors (400–499)
  • Server errors (500–599)

This topic goes through some of the most common status codes you might encounter while making HTTP requests. You don’t need to memorize these status codes. However, it’s important to be familiar with the types of responses you might receive in each category.

Informational responses (100–199)

Informational responses indicate that a server received and understood a request. The server transmits these status codes to inform the client that their request is being processed.

100 Continue

Indicates that the request is being processed and everything is OK so far. The client should continue with the request. The server intends to send a complete response after the request is done being processed.

101 Switching Protocols

Indicates that the server agreed to switch protocols up the request of the client.

Successful responses (200–299)

Successful responses indicate that the request has been completed successfully.

200 OK

Indicates that the request was successful. The request method determines the response body. In a GET request, the response contains an entity that corresponds to the requested resource. In a POST request, the response contains an entity that describes the result of the action.

201 Created

Indicates that the request has been fulfilled and a new resource was created.

202 Accepted

Indicates that the request has been accepted for processing, but the processing has not been completed.

204 No Content

Indicates that the server processed the request successfully without returning content.

205 Reset Content

Indicates that the server successfully processed the request without returning content. The server responds with a request for the client to reset its document view.

Redirects (300–399)

Redirection is used to communicate that a resource has been moved to a new location. These status codes provide requests with information about where to find the content.

300 Multiple Choices

Indicates multiple options for the resource that the client can choose from.

301 Moved Permanently

Indicates that the request and future requests should be direct to a provided URI.

Client errors (400–499)

Client errors indicate that the client made an error while requesting a resource or there’s a problem with the client’s browser.

400 Bad Request

Indicates that the server didn’t understand the request.

401 Unauthorized

Indicates that the client is unauthorized to access the requested resource.

403 Forbidden

Indicates that the server understood the request and the request was valid, but the requester can’t access to the requested resource.

404 Not Found

Indicates that the server can’t find the requested resource. The following is a sample 404 Not Found page:

405 Method Not Allowed

Indicates thte the request method is not supported for the request resource. For example, when a form requires data to be sent through a POST request but the client makes a GET request.

408 Request Timeout

Indicates that the server timed out while witing for the request.

413 Payload Too Large

Indicates that the payload with the request is larger than the server can process.

Server errors (500–599)

Server errors indicate that the server is aware that it has encountered an error or is incapable of performing the request.

500 Internal Server Error

Indicates that there was an error on the server side and the request couldn't be completed. The following is a sample 500 Internal Server Error page:

501 Not Implemented

Indicates that the server lacks the ability to fulfill the request.

503 Service Unavailable

Indicates that the server can't handle the request because it's temporarily overloaded or down for maintenance.


Related Terms

Programming
HyperText Transfer Protocol (HTTP)

HyperText Transfer Protocol (HTTP) is the protocol used by the Web that defines how messages are formatted and transmitted between devices...

Programming
404 Error Code

A 404 error code is an Hypertext Transfer Protocol status response code (or HTTP status code) indicating that the page on a website a user is...