TheCyberNews

HTTP Status Codes

A developer cheat sheet for standard HTTP response status codes, organized by class.

CodeTitleDescription
100ContinueThe server has received the request headers and the client should proceed to send the request body.
101Switching ProtocolsThe requester has asked the server to switch protocols and the server has agreed to do so.
200OKStandard response for successful HTTP requests.
201CreatedThe request has been fulfilled, resulting in the creation of a new resource.
202AcceptedThe request has been accepted for processing, but the processing has not been completed.
204No ContentThe server successfully processed the request and is not returning any content.
301Moved PermanentlyThis and all future requests should be directed to the given URI.
302Found (Moved Temporarily)The resource was temporarily moved to a different URI.
304Not ModifiedIndicates that the resource has not been modified since the version specified by the request headers.
308Permanent RedirectThe request and all future requests should be repeated using another URI.
400Bad RequestThe server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax).
401UnauthorizedSimilar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.
403ForbiddenThe request contained valid data and was understood by the server, but the server is refusing action (often due to missing permissions).
404Not FoundThe requested resource could not be found but may be available in the future.
405Method Not AllowedA request method is not supported for the requested resource (e.g. a GET request on a form that requires POST).
408Request TimeoutThe server timed out waiting for the request.
429Too Many RequestsThe user has sent too many requests in a given amount of time (Rate Limiting).
500Internal Server ErrorA generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
502Bad GatewayThe server was acting as a gateway or proxy and received an invalid response from the upstream server.
503Service UnavailableThe server cannot handle the request (because it is overloaded or down for maintenance).
504Gateway TimeoutThe server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

What are HTTP Status Codes?

When you visit a website, your browser sends a request to the site's server. The server then responds to the browser's request with a three-digit code: an HTTP status code. These codes indicate whether a specific HTTP request has been successfully completed.

The 5 Classes of Status Codes:

  • 1xx (Informational): The request was received, continuing process.
  • 2xx (Successful): The request was successfully received, understood, and accepted. (e.g., 200 OK).
  • 3xx (Redirection): Further action needs to be taken in order to complete the request. (e.g., 301 Moved Permanently).
  • 4xx (Client Error): The request contains bad syntax or cannot be fulfilled. This generally means the error is on the user's end. (e.g., 404 Not Found or 403 Forbidden).
  • 5xx (Server Error): The server failed to fulfill an apparently valid request. This generally means the error is on the server's end. (e.g., 500 Internal Server Error).