Developer's Guide to Server Response Codes image


When working online, you deal with servers. A lot. And sometimes it gets confusing – especially when server response codes come in to the picture. That’s why we’ve created this handy cheat sheet to help you keep them straight. As a developer, these kinds of tools can be lifesavers. Our goal is to provide you with a one-stop point of reference for server response codes!

1xx Codes: Informational Responses

Server response codes that begin with a 1, such as 100 or 101, are provisional responses used to provide some sort of general overview information.

100: Continue

A 100 response code indicates that the server has received headers from the request and that the processing client will request body content.

101: Changing Protocol

A 101 response indicates that the requesting client needs the server to change protocols and that the server is agreeing to the suggested change.

102: Processing

A 102 response indicates that a request has been received by the server and is being processed, but that the response is yet to become available.

2xx Codes: Success Responses

200-level response codes are used to show that the processing client was able to successfully receive and process the action requested.

200: Ok

This is the standard response for all successful HTTP requests.

201: Created

A 201 response indicates that a request has been fulfilled by the server and that this request lead to the creation of a new resource.

202: Accepted

A 202 response indicated that a request has been accepted for processing but that the processing has yet to be completed.

203: Non-Authoritative Information

A 203 response indicates that the request has been successfully completed by the server but that the information being returned may be from another source. As such, the legitimacy of the information provided may not be verifiable.

204: No Content

A 204 response indicates that the request has been successfully completed by the server but that no content is being returned.

205: Reset Content

A 205 response indicates that the requester must reset the document view for the server to return any content.

206: Partial Content

A 206 response indicates that only part of the requested content is being made available by the server because of a Range header being sent by the client.

207: Multi-Status

A 207 response is delivered in the form of an XML message with a varying number of separate response codes, which changes based on how many sub-requests are made.

208: Already Reported

A 208 response indicates that certain elements within a DAV binding will not be produced in response to the request because they have already been produced.

226: IM Used

A 226 response indicates that instance-manipulations are being applied to the current instance of a resource as it is delivered by the server.

3xx Codes: Redirection Responses

Requests that will require the client to take some additional action, such as URL redirects, are indicated by 300-level response codes.

300: Multiple Choices

A 300 response indicates that two or more different options are available for presenting the resource.

301: Moved Permanently

A 301 redirect indicates that content has been moved to a new URL and that all requests for the content should be directed there.

302: Moved Temporarily

A 302 redirect indicates that a resource has been temporarily moved to a different URL, but that it will be returned in the future.

303: See Other

A 303 response indicates that a resource can be found using the GET method with a different uniform resource identifier (URI).

304: Not Modified

A 304 response uses specific request headers to indicate that the resource has yet to be modified.

305: Use Proxy

A 305 response is used to indicate that a proxy will be required to retrieve the requested resource. The address of the proxy is provided within the response.

306: Switch Proxy

A 306 response was originally used to indicate that a request must be made via a specific proxy, but this response code is no longer in use.

307: Temporary Redirect

A 307 response indicates that the request made at a certain point in time will require a different URI to be used, but that in the future the request can be made with the original URI.

308: Permanent Redirect

A 308 response indicates that the current request, as well as all future requests, should be attempted using a separate URI.

4xx Codes: Client Error Responses

Server response codes beginning with 4, such as 400 or 401, are used to help explain some sort of client error made during the request.

400: Bad Request

A 400 response indicates that some client error is prohibiting the server from completing the request.

401: Unauthorized

A 401 response indicates that a user has failed to provide proper authentication when that authentication is required to access the requested data.

402: Payment Required

A 402 response is a transactional code. It was originally meant to be a part of a digital payment system, but this system has yet to be created. The code is seldom used today.

403: Forbidden

A 403 response indicates that the request made is valid, but that the server is refusing to address the request – even with authentication.

404: Page Not Found

A 404 response indicates that the resource being requested has not been found. This resource may become available again in the future.

405: Method Not Allowed

A 405 response indicates that the method used to request a resource is not supported by the resource itself.

406: Not Acceptable

A 406 response indicates that the only content the requested resource is capable of generating is deemed “not acceptable” according to the request’s Accept headers.

407: Proxy Authentication Required

A 407 response indicates that the request may only be completed once the client is authenticated with the proxy.

408: Request Timeout

A 408 response indicates that the request took too long to complete, causing the server to time out.

409: Conflict

A 409 response is shared to indicate that conflicting information exists within a request and that the conflict will prevent the request from being processed.

410: Gone

410 responses are somewhat interchangeable with 404 errors. These codes indicate that the requested resource isn’t available any longer. 410 errors also indicate that the requested resource will not be available in the future.

411: Length Required

A 411 response indicates that a requested resource requires the length of its content to be specified but that the length is not provided.

412: Precondition Failed

A 412 response represents the instance in which a server does not meet the requester’s preconditions for a request.

413: Request Entity too Large

A 413 response indicates that the request made is greater than the server’s processing capabilities.

414: Request-URI too Long

A 414 response indicates that the request cannot be processed by the server because the URI is too long.

415: Unsupported Media Type

A 415 response indicates that the requested item is transmitted as a media type that the server or resource does not support.

416: Requested Range Not Satisfiable

A 416 response indicates that the specific file portion requested by the client cannot be provided.

417: Expectation Failed

A 417 response indicates that the requirements laid out in the Expect request-header field cannot be met.

418: I’m a Teapot

Yep. The 418 response code really is known as “I’m a teapot.” This code was introduced as an April Fool’s joke in 1998.

419: Authentication Timeout

A 419 response indicates that a previously-valid authentication has expired.

421: Misdirected Request

A 421 response indicates that the specific server being pinged is not able to produce a response.

422: Unprocessable Entity

A 422 response indicates that semantic errors are preventing the request from being followed.

423: Locked

The 423 response indicates that access to the requested resource is locked.

424: Failed Dependency

A 424 response indicates that a previous request is causing a current request to fail.

426: Upgrade Required

A 426 response indicates that the Upgrade header field demands a different protocol be used by the client.

428: Precondition Required

A 428 response indicates that there is a requirement held by the server for the request to be conditional in nature or meet some certain condition.

429: Too Many Requests

The 429 response appears when the user sends too many requests over an allotted period.

431: Request Header Fields too Large

The 431 response indicates that one or more of the header fields is too large, rendering the server unwilling to process the request.

5xx Codes: Server Error Responses

500-level server response codes appear when a server becomes aware that there is some error or breakdown that will prevent it from performing a request.

500: Internal Server Error

The 500 response code is a generic error message that is displayed when there isn’t an appropriate specific message to explain an unexpected condition which has occurred.

501: Not Implemented

A 501 response indicates that the request method is not recognized by the server.

502: Bad Gateway

A 502 response indicates that an upstream server received an invalid response from another server acting as a gateway or a proxy.

503: Service Unavailable

A 503 response indicates that a server is unavailable at the time the request is made. This is typically a temporary state.

504: Gateway Timeout

A 504 response is generated when a server acts as a gateway or proxy but does not receive a response from the upstream server in a timely fashion.

505: HTTP Version Not Supported

A 505 response indicates that the HTTP protocol mentioned in a request is not support.

506: Variant Also Negotiates

A 506 response indicates that a circular reference is created by transparent content negotiation for the request.

507: Insufficient Storage

A 507 response indicates that the server does not store the representation required to complete the request that has been made.

508: Loop Detected

A 508 response indicates that the request caused the server to fall into an infinite loop while trying to process.

510: Not Extended

A 510 response indicates that in order for a server to fulfill a request, further extensions must be added to the request.

511: Network Authentication Required

A 511 response indicates that network access cannot be granted to a client because that client has not properly authenticated.

Additional Server Response Codes

It is worth noting that while this list is quite comprehensive, there are several additional server response codes we chose not to include. That’s because these codes are generated by specific entities, such as Microsoft, Spring and Twitter. We’ve only included standard HTTP response codes using Internet Engineering Taskforce (IETF) standards and IETF RFC (Requests for Comments).


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>