Http Status Codes Cheat Sheet



If you have ever copied a link from your browser and noticed that http:// or https:// had been added before the domain, you are looking at the protocol used which defines how messages are formatted and transmitted. It also defines how web servers and browsers should respond to various commands.

HTTP stands for HyperText Transfer Protocol and is used, or at least the variant HyperText Transfer Protocol Secure (HTTPS), for nearly every single website on the internet.

  • HTTP Status cheatsheet # WebDAV Status Codes WebDAV is an extension of HTTP that allows clients to perform remote Web content authoring operations. It provides a framework for users to create, change and move documents on a server.
  • HTTP Status Codes for Rails Enjoy this cheat sheet at its fullest within Dash, the macOS documentation browser. HTTP status codes and their respective Rails symbol representations. For example,:notfound can be used instead of 404 in a render call: render file: '404.html.erb', status::notfound.

HTTP Codes

Http Status Codes Cheat Sheet

All HTTP response codes can be separated into five categories:

  • 1xx informational response - the request has been received and continuing process
  • 2xx successful - the request has been received, understood, and accepted
  • 3xx redirection - further action is needed in order to complete the request
  • 4xx client error - the request contains bad syntax or cannot be fulfilled
  • 5xx server error - the server failed to fulfill the apparently valid request

1xx: Information

MessageDescription
100 ContinueThe server has received the request headers and the client should proceed to send the request body providing that the request has been accepted.
101 Switching ProtocolsThe requester has asked to switch protocols and the server has agreed.
102 ProcessingA WebDAV request may take a long time to process, since it involves file operations. This code is used to indicate that the server has received the request and is processing, but does not have a response yet.
103 Early HintsThis code is used to return some response headers before the final HTTP message is sent.

2xx: Success

Status

Dig deeper into this article to explore a beginner’s guide to HTTP status code cheat sheet. Top 5 HTTP Status Codes Every Website Owner Should Know About. When a user explores a website or page, they either land on the requested file or faces an HTTP page. The HTTP page depicts some code and makes the user aware that their request was not. The 1xx HTTP status codes are the informational requests that indicate that the server received and understood the request, but it needs a little longer to process the information. They include the '100 Continue', '101 Switching Protocol', and '102 Processing HTTP status codes.' The 2xx HTTP status codes are the successful requests.

MessageDescription
200 OKThis is the standard response for successful HTTP requests. Code 200 means everything is okay.
201 CreatedThe fulfilled request resulted in the creation of a new resource.
202 AcceptedThe request has been accepted for processing, but has not completed processing.
203 Non-Authoritative InformationThe information contained in the entity header is from a local or third-party copy, not from the original.
204 No ContentThe server successfully processed the request, but is not returning any content.
205 Reset ContentThe requester should clear the form used for the transaction.
206 Partial ContentThe server is only delivering part of the resource due to a range header that was sent by the client. This range header is used by HTTP clients to enable resuming interrupted downloads or split downloads in multiple simultaneous streams.
207 Multi StatusThis code indicates that the following message body contains an XML message and can contain multiple separate response codes.
208 Already ReportedThe members of a DAV binding were already enumerated in a previous part of the response and thus, are not being included again
226 IM UsedThe server has fulfilled a request for the resource. The response is a representation of the result of one or more instance-manipulations that were applied to the instance.

3xx Redirection

MessageDescription
300 Multiple ChoicesA list of links, from which the requester can select one and go to it. For example, this code could be used to present multiple video formats.
301 Moved PermanentlyThe requested page has been moved permanently to a new URL.
302 FoundThe request has been moved temporarily to a new URL.
303 See OtherThe response can be found under another URL.
304 Not ModifiedThe response code to an If-Modified-Since or If-None-Match header where the URL has not been modified since the specified date.
305 Use ProxyThe requested resource is only available through a proxy, whose address is provided in the response. This code is generally disobeyed for security reasons
306 UnusedThis code is currently unused, but was used for 'Switch Proxy'.
307 Temporary RedirectThe requested page has temporarily moved to new URL.
308 Permanent RedirectThe request should be repeated using another URL, but the HTTP method cannot change.

4xx Client Errors

MessageDescription
400 Bad RequestThere is an apparent client error and therefore the server cannot or will not process the request.
401 UnauthorizedThe requested page requires a username and password.
402 Payment RequiredThis code is reserved for future use. Its original intention was to be used as a part of digital cash or micropayment system.
403 ForbiddenThe request was understood by the server, but the server will not take action. This may be due to the user not having necessary permissions.
404 Not FoundThe requested resource cannot be found. Most people know or have heard about this code. Most have even seen the error once or twice.
405 Method Not AllowedThe method is not supported for the resource. For example performing a GET request on a form that uses POST.
406 Not AcceptableThe server cannot generate a response that is accepted by the client.
407 Proxy Authentication RequiredYou must first authenticate with the proxy.
408 Request TimeoutThe request took longer than the server was willingly to wait.
409 ConflictThis code indicates that the request could not be processed because of conflict in the current state of the resource.
410 GoneThe requested is no longer available.
411 Length RequiredThe request did not specify the length of its content. The server cannot accept the request without it.
412 Precondition FailedThe pre-condition that was given in the request evaluated to false by the server.
413 Request Entity Too LargeSince the request entity is too large, the server will not accept the request.
414 Request-url Too LongThe requested URL was too long for the server to process.
415 Unsupported Media TypeThe server will not accept the request since the mediatype is not supported.
416 Request Range Not SatisfiableThe client has asked for a portion of the file, but the server cannot provide that portion.
417 Expectation FailedThe server cannot meet the requirement given by the Expect request-header field.
418 I'm a teapotThis code was introduced as an April Fools' joke. It is currently unexpected to be implemented by actual servers.
421 Misdirected RequestThe request was directed to a server that is not able to produce a response.
422 Unprocessable EntityThe request was well-formed but the server was unable to follow due to semantic errors.
423 LockedThe resource that is being accessed is locked.
424 Failed DependencyThe request failed because the request it depended upon failed.
425 Too EarlyThe server is unwilling to process a request that might be replayed later.
426 Upgrade RequiredThe client should switch to a different protocol that is given in the Upgrade header field.
428 Precondition RequiredThe origin server requires the client request to be conditional.
429 Too Many RequestsThe client has sent too many request in a given amount of time.
431 Request Header Fields Too LargeThe server refuses to process the client requests because the request's HTTP headers are too long.
451 Unavailable for Legal ReasonsThis indicates that the requested resource is not available due to legal reasons.

Http Status Codes Cheat Sheet

5xx Server Errors

MessageDescription
500 Internal Server ErrorThis code indicates that the server experienced an unexpected condition which prevented it from fulfilling the request.
501 Not ImplementedThe server did not recognize the request method or is unable to fulfill the request.
502 Bad GatewayThe server, while acting as either a gateway or proxy, has received an invalid response from the upstream server.
503 Service UnavailableThe server cannot handle the request.
504 Gateway TimeoutThe server, while acting as either a gateway or proxy, did not receive a timely response from the upstream server.
505 HTTP Version Not SupportedThe client HTTP protocol version used in the request is not supported by the server.
506 Variant Also NegotiatesThe server encountered an internal configuration error in which the chosen variant is configured to engage in content negotiation.
507 Insufficient StorageThis indicates that the server cannot perform the request as the server cannot store the representation needed to complete the request.
508 Loop DetectedWhile processing the request, the server detected an infinite loop.
510 Not ExtendedThe request needed further extensions for the server to fulfill it.
511 Network Authentication RequiredThe client needs to authenticate to gain network access. This code is not sent by the origin server, however it is generated by intercepting proxies that control access to the network.

HTTP unassigned codes

There are many HTTP codes that are unassigned. Some of them may be introduced in later revisions. Even with the limited amount of currently assigned codes, some people may never see many of these codes. Many end-users, however, may be familiar with 404 and 500 as they have an auto-generated error page.

HTTP codes are important to understand, especially if you are developing a web application and are trying to debug based upon the console responses. Knowing these codes came in handy while I was working on my website and forgot to allow methods through the function. This returned a 501 code, allowing me to easily find my mistake. Hopefully this guide of codes can help you!

About the author

Http Status Codes Cheat SheetGregory Manley

Gregory Manley is a sophomore at Colorado School of Mines where he is majoring in Computer Science with a minor in Mining Engineering. He is the owner of iTech News and a contributor for Section’s Engineering Education Content Program. His management of iTech News has led him to work with many brands on writing technology focus articles.

HTTP status codes and their respective Rails symbol representations. For example, :not_found can be used instead of 404 in a render call:

Cheat

1xx Informational

:continue

The server has received the request headers, and that the client should proceed to send the request body.

:switching_protocols

The requester has asked the server to switch protocols and the server is acknowledging that it will do so.

:processing

The server has received and is processing the request, but no response is available yet.

2xx Success

Easy E M Cheat Sheet

:ok

The standard response for successful HTTP requests.

:created

The request has been fulfilled and a new resource has been created.

:accepted

The request has been accepted but has not been processed yet. This code does not guarantee that the request will process successfully.

:non_authoritative_information

HTTP 1.1. The server successfully processed the request but is returning information from another source.

:no_content

The server accepted the request but is not returning any content. This is often used as a response to a DELETE request.

:reset_content

Similar to a 204 No Content response but this response requires the requester to reset the document view.

:partial_content

The server is delivering only a portion of the content, as requested by the client via a range header.

:multi_status

The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.

WebDAV - RFC 4918

:already_reported

The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again.

WebDAV - RFC 5842

:im_used

The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

Http Status Codes Cheat Sheet Pdf

3xx Redirection

:multiple_choices

There are multiple options that the client may follow.

:moved_permanently

The resource has been moved and all further requests should reference its new URI.

:found

The HTTP 1.0 specification described this status as 'Moved Temporarily', but popular browsers respond to this status similar to behavior intended for 303. The resource can be retrieved by referencing the returned URI.

:see_other

The resource can be retrieved by following other URI using the GET method. When received in response to a POST, PUT, or DELETE, it can usually be assumed that the server processed the request successfully and is sending the client to an informational endpoint.

:not_modified

The resource has not been modified since the version specified in If-Modified-Since or If-Match headers. The resource will not be returned in response body.

:use_proxy

HTTP 1.1. The resource is only available through a proxy and the address is provided in the response.

:reserved

Deprecated in HTTP 1.1. Used to mean that subsequent requests should be sent using the specified proxy.

:temporary_redirect

HTTP 1.1. The request should be repeated with the URI provided in the response, but future requests should still call the original URI.

:permanent_redirect

Experimental. The request and all future requests should be repeated with the URI provided in the response. The HTTP method is not allowed to be changed in the subsequent request.

4xx Client Error

:bad_request

The request could not be fulfilled due to the incorrect syntax of the request.

:unauthorized

The requestor is not authorized to access the resource. This is similar to 402 but is used in cases where authentication is expected but has failed or has not been provided.

:payment_required

Reserved for future use. Some web services use this as an indication that the client has sent an excessive number of requests.

:forbidden

The request was formatted correctly but the server is refusing to supply the requested resource. Unlike 402, authenticating will not make a difference in the server's response.

:not_found

The resource could not be found. This is often used as a catch-all for all invalid URIs requested of the server.

:method_not_allowed

The resource was requested using a method that is not allowed. For example, requesting a resource via a POST method when the resource only supports the GET method.

:not_acceptable

The resource is valid, but cannot be provided in a format specified in the Accept headers in the request.

:proxy_authentication_required

Authentication is required with the proxy before requests can be fulfilled.

:request_timeout

The server timed out waiting for a request from the client. The client is allowed to repeat the request.

:conflict

The request cannot be completed due to a conflict in the request parameters.

:gone

The resource is no longer available at the requested URI and no redirection will be given.

:length_required

The request did not specify the length of its content as required by the resource.

:precondition_failed

The server does not meet one of the preconditions specified by the client.

:request_entity_too_large

The request is larger than what the server is able to process.

:request_uri_too_long

The URI provided in the request is too long for the server to process. This is often used when too much data has been encoded into the URI of a GET request and a POST request should be used instead.

:unsupported_media_type

The client provided data with a media type that the server does not support.

:requested_range_not_satisfiable

The client has asked for a portion of the resource but the server cannot supply that portion.

:expectation_failed

The server cannot meet the requirements of the Expect request-header field.

:unprocessable_entity

The request was formatted correctly but cannot be processed in its current form. Often used when the specified parameters fail validation errors.

WebDAV - RFC 4918

:locked

The requested resource was found but has been locked and will not be returned.

WebDAV - RFC 4918

:failed_dependency

The request failed due to a failure of a previous request.

WebDAV - RFC 4918

:upgrade_required

The client should repeat the request using an upgraded protocol such as TLS 1.0.

5xx Server Error

:internal_server_error

A generic status for an error in the server itself.

:not_implemented

The server cannot respond to the request. This usually implies that the server could possibly support the request in the future — otherwise a 4xx status may be more appropriate.

:bad_gateway

The server is acting as a proxy and did not receive an acceptable response from the upstream server.

:service_unavailable

The server is down and is not accepting requests.

:gateway_timeout

The server is acting as a proxy and did not receive a response from the upstream server.

:http_version_not_supported

The server does not support the HTTP protocol version specified in the request.

:variant_also_negotiates

Transparent content negotiation for the request results in a circular reference.

:insufficient_storage

The user or server does not have sufficient storage quota to fulfill the request.

WebDAV - RFC 4918

:loop_detected

The server detected an infinite loop in the request.

WebDAV - RFC 5842

:not_extended

Further extensions to the request are necessary for it to be fulfilled.

:network_authentication_required

The client must authenticate with the network before sending requests.

Notes

Icd 10 Cheat Sheet For Family Practice

Http Status Codes Cheat Sheet

E M Cheat Sheet

  • Based on cheat.errtheblog.com and List of HTTP status codes on Wikipedia.