List Of HTTP Response Codes

HTTP response codes are given to the browser whenever the browser completes a task. These messages can beanything from a resource loading correctly, or your contact form failing to submit. The browser normallydoes not show these responces unless they are errors, although you can find a log of them if you wish.However, if an error occurs, you can easily find it in the console, and possibly display on-screen. You canlearn how to set custom error pages here.

Levels of response codes

Did you know that the first number of an HTTP response will tell you what category the message is in? Ifyou didn’t, you do now! There are five different categories, beginning with the number one, two, three,four, and five respectively. Makes sense right?

Responses beginning with one are informative responses. If it begins with the number two, it’s asuccessful response. Beginning with a three means that it is a redirect. If it begins with a four, thatmeans there was a client error. Lastly, a response beginning with a five means there was a server error.Confused? Check out the table below.

Begins withMessageRange
Begins with a one (1)Informative100-199 Response codes
Begins with a two (2)Success200-299 Response codes
Begins with a three (3)Redirect300-399 Response codes
Begins with a four (4)Client Error400-499 Response codes
Begins with a five (5)Server Error500-599 Response codes

List of all response codes

Informative Responses (100-199)

CodeMeaningDescription
100ContinueA response meaning that everything is working properly, and the client computer should continuerequesting information, unless all requests have been completed
101Switching ProtocolsIndicating that the protocol is switching, and providing the new protocol to connect with
102ProcessingIndicating that the server has received and is processing the request, but no other information isavailable yet
103Early HintsUsed to return various response headers before main content load. Not compatible with most browsers.

Advertisement

 

Successful Responses (200-299)

CodeMeaningDescription
200OKThe request has succeeded
201CreatedTypically sent after POST requests, this response means that the request has succeeded, and as aresult, a new resource has been created
202AcceptedThe server has received the request, but has not begun processing it. Typically used when multipleservers are used to accept and progress requests
203Non-Authoritative InformationReturned meta-information is not the same from the origin server, and is collected locally or froma third party. Unless those requirements are met, a “200 - OK” code is used instead
204No ContentNo content is available to send for the request. The user-agent device may update cache-headersfor this resource
205Reset ContentInforming the user-agent device to reset the document that sent the request
206Partial ContentAn XML message that by default contains a number of separate response codes depending on the number of sub-requests were made
207Multi StatusUsed when the Range header sent from the client requests only part of the resource
208Already ReportedMembers of a DAV binding have already been received in an earlier part of the multistatus response, and are not being included again
226IM UsedThe server has completed a resource request, and the response is a representation of the result of one or more instance-manipulations applied to the current instance

Redirection Responses (300-399)

CodeMeaningDescription
300Multiple ChoicesUsed when the request has multiple possible responses. The user-agent is then responsible forselecting a response
301Moved PermanentlyThe requested URL has been permanently moved. Directs the user-agent to update the cache toreflect changes
302FoundThe requested URI has been temporarily moved. Future changes may be made, and cache should not beupdated
303See OtherThis response is used when the server requests the client to get a requested resource elsewherewith a GIT parameter
304Not ModifiedUsed for caching purposes. This response tells the client that the response has not been changed,so the client can continue its use of the cached version
307Temporary RedirectA response used to direct the client to a different resource at a different URI using the samemethod
308Permanent RedirectThe resource has been permanently moved. Similar to “301 - Moved Permanently”, except theuser-agent cannot change the request method

Advertisement

 

Client Error Responses (400-499)

CodeMeaningDescription
400Bad RequestLearn More - The server could not understand therequest
401UnauthorizedLearn More - Technically “Aunauthorcated“. Meaningthat the client needs to authenticate to gain access
402Payment RequiredReserved for future use. The idea was to use it for online payment, but the code is rarely used,and in some instances, not implemented
403ForbiddenLearn More - The client does not have the rightsto access this content. Learn how to customize theerror page
404Not FoundLearn More - The most common 400 error code. Perit’s name, the response means that the requested resource cannot be found. Learn how to customize this error page
405Method Not AllowedThe methods used in the request are supported on the server, but are not supported by the resource
406Not AcceptableSent when the server doesn’t find any matching content after performing server-driven contentnegotiation
407Proxy Authorization RequiredSimilar to “401 - Unauthorized” except authorization must be completed by a proxy
408Request TimeoutLearn More - Used when the server wished to closethe connection. Sometimes sent on idle server connections. Some servers do not send the message, butabruptly shut down instead
409ConflictA response sent when a request conflicts with the server
410GoneResponse returned when requested content has been removed from the server, without a forwardingaddress listed. The user agent should purge any cache on the resource
411Length RequiredUsed when the “Content Length” header is not defined, but the server requires it
412Precondition FailedClient has conditions defined in the headers that the server does not meet
413Payload Too LargeRequest is larger than server defined limits. The server may close the connection or send a 409responce
414URI Too LongUsed when the server is not willing to interpret a client’s long URI
415Unsupported Media TypeRequest rejected by the server, as the requested media format of requested data is not supportedby the server
416Range Not SatisfiableRange specified on the header cannot be completed. The range may be outside the size of the targetURI’s data
417Expectation FailedResponse code used to indicate that the “Expect” header field cannot be met by the server
418I'm a teapotLearn More - Used when the server refuses to brewcoffee with a teapot
421Misdirected RequestUsed when the request is sent to a server that cannot produce a response. Can also be sent byservers not configured to send responses
425Too EarlyUsed when the server is unwilling to process a possible duplicate request
428Precondition RequiredThe server requires a conditional request that is not met by the user-agent
429Too Many RequestsLearn More - The client has sent too manyrequests in a given timeframe, and has been temporarily blocked by the server
431Request Header Fields Too LargeThe server refuses to process the request because the headers are too large. If headers arereduced in size, the request may be accepted by the server
451Unavailable For Legal ReasonsThe resource cannot be legally provided by the server per the servers configuration

Server Error Responses (500 - 599)

CodeMeaningDescription
500Internal Server ErrorLearn More - The server encountered an unknownerror.
501Not ImplementedThe server does not support the request method used. Only GET and HEAD methods are required forservers to support
502Bad GatewayThis response means that the server, while trying to get a response from a different server orgateway, encountered an error
503Service UnavailableLearn More - This response means that the serveris not ready to handle requests. The server may be down for maintenance, or it may be overloaded
504Gateway TimeoutSimilar to “502 Bad Gateway”, except the server is unable to set a request in the timeframeprovided
505HTTP Version Not SupportedThe HTTP version used in the request is not supported by the server
506Variant Also NegotiatesAn internal error has occurred pertaining to the negotiation of resources
508Loop DetectedThe server detected an endless loop during processing and aborted the request
510Not ExtendedAdditional extensions are required for the server to process the request
511Network Authorization RequiredThis response means that the client must authenticate to gain acess to the server network

Conclusion

That's it! Check out the Response Codes FAQ to learn more about the mostpopular error codes. If we messed up (After all, we are humans), please let usknow!

Advertisement

Article Author

Related Articles

HTTP 400 Error (And How To Fix It)

The HTTP 418 error is given when the server refuses to brew coffee, mainly because it calls itself a teapot Otherwise known as the Hypertext Coffeepot Protocol, this error code originated from <a hre...

Advertisement

All code and content © 2024. Contact Us to learn more.