HTTP response status codes indicate the outcome of an HTTP request. These codes are typically three-digit numbers, grouped into five classes:
Informational (100–199)
Successful (200–299)
Redirection (300–399)
Client Error (400–499)
Server Error (500–599)
Understanding the meaning of these status codes is essential for developing web applications and services. In this article, we will explore each status code and its significance in detail.
Informational (100–199)
Status codes in the informational class indicate that the server has received the request and is processing it. The client should continue to wait for a response. The following codes are included in this class:
100 Continue: The server has received the request headers and the client should proceed to send the request body.
101 Switching Protocols: The server agrees to switch to the requested protocol.
102 Processing: The server is processing the request, but the response has not yet been completed.
Successful (200–299)
Status codes in the successful class indicate that the request was successful and the server has returned the expected response. The following codes are included in this class:
200 OK: The request was successful and the server has returned the requested data.
201 Created: The request was successful, and the server has created a new resource.
202 Accepted: The request was successful, but the server has not yet completed processing the request.
203 Non-Authoritative Information: The server is returning information that may be from another source.
204 No Content: The server has successfully processed the request but is not returning any content.
205 Reset Content: The server is asking the client to reset the document view.
206 Partial Content: The server is returning a partial response to the client’s request.
207 Multi-Status: The message body contains status information about multiple HTTP requests.
208 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.
226 IM Used: The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
Redirection (300–399)
Status codes in the redirection class indicate that the requested resource has moved to a different location. The client should follow the instructions in the response to locate the new resource. The following codes are included in this class:
300 Multiple Choices: The requested resource has multiple representations, each with a different location.
301 Moved Permanently: The requested resource has permanently moved to a new location.
302 Found: The requested resource has temporarily moved to a new location.
303 See Other: The requested resource can be found at a different location, and the client should use the specified URL to retrieve it.
304 Not Modified: The requested resource has not been modified since the client last requested it.
305 Use Proxy: The requested resource must be accessed through the specified proxy.
307 Temporary Redirect: The requested resource has temporarily moved to a new location, and the client should use the specified URL to retrieve it.
308 Permanent Redirect: The requested resource has permanently moved to a new location, and the client should use the specified URL to retrieve it.
Client errors (400–499)
Client errors indicate that there was an error with the request made by the client. These errors are caused by issues with the request, such as invalid or missing parameters, authentication problems, or requests that violate security policies.
400 Bad Request: The 400 Bad Request status code indicates that the server cannot or will not process the request due to an error with the request itself. This error can occur due to malformed syntax, invalid characters, or incomplete information in the request.
401 Unauthorized: The 401 Unauthorized status code indicates that the request requires authentication, but the client did not provide valid credentials. This error can occur when the user attempts to access a resource without proper authorization or when the authentication token has expired.
402 Payment Required: The 402 Payment Required status code is reserved for future use and is not currently in use.
403 Forbidden: The 403 Forbidden status code indicates that the client does not have access to the requested resource. This error can occur due to insufficient permissions or authorization issues. The server may also return this code when the client has exceeded a rate limit or when the server is under heavy load.
404 Not Found: The 404 Not Found status code indicates that the requested resource could not be found on the server. This error can occur due to a mistyped URL, a deleted resource, or a broken link.
405 Method Not Allowed: The 405 Method Not Allowed status code indicates that the requested method is not allowed for the specified resource. This error can occur when a client tries to use an unsupported method or when a server does not support the requested method.
406 Not Acceptable: The 406 Not Acceptable status code indicates that the server cannot produce a response matching the list of acceptable values defined in the request’s headers. This error can occur when the client specifies unsupported data formats or when the server cannot produce the requested data in the specified format.
407 Proxy Authentication Required: The 407 Proxy Authentication Required status code indicates that the client must first authenticate itself with the proxy before the request can be made. This error can occur when the client does not have valid credentials or when the proxy requires additional authentication for a particular request.
408 Request Timeout: The 408 Request Timeout status code indicates that the server did not receive a complete request from the client within the specified timeout period. This error can occur when the network connection is slow or when the server is overloaded.
409 Conflict: The 409 Conflict status code indicates that the request cannot be completed due to a conflict with the current state of the target resource. This error can occur when two or more clients try to modify the same resource simultaneously, or when the requested operation conflicts with another operation.
410 Gone: The 410 Gone status code indicates that the requested resource is no longer available on the server and will not be available again. This error can occur when the server has permanently deleted the resource or when the resource has been moved to a different location.
411 Length Required: The 411 Length Required status code indicates that the server requires a valid Content-Length header to be included in the request. This error can occur when the client does not provide the required content length, and the server is unable to process the request.
412 Precondition Failed: The 412 Precondition Failed status code indicates that the client has provided headers that conflict with the requested resource’s current state. This error can occur when the client sends an If-Match or If-Unmodified-Since header, and the server detects a mismatch.
413 Payload Too Large: The request payload exceeds the maximum size allowed.
414 URI Too Long: The request URI exceeds the maximum length allowed.
415 Unsupported Media Type: The request entity has a media type that the server does not support.
416 Range Not Satisfiable: The server cannot provide a response for the requested range.
417 Expectation Failed: The server cannot meet the requirements specified in the Expect header of the request.
418 I’m a teapot: The server is a teapot, and cannot brew coffee or tea.
421 Misdirected Request: The request was directed at a server that is not able to produce a response.
422 Un processable Entity: The request was well-formed, but the server was unable to process it.
423 Locked: The requested resource is locked and currently unavailable.
424 Failed Dependency: The request failed due to a failure of a previous request.
426 Upgrade Required: The client must switch to a different protocol.
428 Precondition Required: The server requires the request to be conditional.
429 Too Many Requests: The user has sent too many requests in a given amount of time.
431 Request Header Fields Too Large: The request headers are too large.
451 Unavailable For Legal Reasons: The requested resource is unavailable for legal reasons.
Server Error (500–599)
500 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request.
501 Not Implemented: The server does not support the functionality required to fulfill the request.
502 Bad Gateway: The server, while acting as a gateway or proxy, received an invalid response from an upstream server it accessed.
503 Service Unavailable: The server is currently unable to handle the request due to a temporary overload or maintenance of the server.
504 Gateway Timeout: The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it accessed.
505 HTTP Version Not Supported: The server does not support the HTTP protocol version used in the request.
506 Variant Also Negotiates: The server has an internal configuration error.
507 Insufficient Storage: The server has insufficient storage space to complete the request.
508 Loop Detected: The server detected an infinite loop while processing the request.
509 Bandwidth Limit Exceeded: The server has exceeded the bandwidth limit for the response.
510 Not Extended: The server requires an extension to fulfill the request.
511 Network Authentication Required: The client needs to authenticate to gain network access.
520 Unknown Error: A generic error message, typically indicating an unexpected server-side error.
521 Web Server Is Down: The origin server has refused the connection from Cloudflare.
522 Connection Timed Out: Cloudflare could not establish a TCP connection to the origin server.
523 Origin Is Unreachable: Cloudflare could not reach the origin server; for example, if the DNS resolution for the origin server is not working.
524 A Timeout Occurred: Cloudflare could establish a TCP connection to the origin server, but did not receive a timely HTTP response.
525 SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS handshake with the origin server.
526 Invalid SSL Certificate: Cloudflare could not validate the SSL/TLS certificate that the origin server presented.
527 Railgun Error: Error code indicating that an issue occurred communicating with Cloudflare’s Railgun.
© Mejbaur Bahar Fagun
🔀 𝐂𝐨𝐧𝐧𝐞𝐜𝐭 𝐖𝐢𝐭𝐡 𝐌𝐞
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: https://lnkd.in/dQhnGZTy
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤 𝐏𝐚𝐠𝐞: https://lnkd.in/gaSKMG2y
LinkedIn: Mejbaur Bahar Fagun | LinkedIn
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦: https://lnkd.in/gid7Ehku
𝐌𝐞𝐝𝐢𝐮𝐦: https://lnkd.in/gP6V2iQz
𝐆𝐢𝐭𝐡𝐮𝐛: https://github.com/fagunti
𝐘𝐨𝐮𝐓𝐮𝐛𝐞: https://lnkd.in/gg9AY4BE
#HTTPResponse #StatusCodes #WebDevelopment #Troubleshooting #UserExperience #WebDesign #Programming #DevOps #ServerErrors #ClientErrors #InternetProtocol #APIs #DigitalMarketing #Cybersecurity #TechTips #sqa #qa #HTTP #WebPerformance #ErrorHandling #WebsiteOptimization #ServerManagement #CloudComputing #BackendDevelopment #WebServers #InternetStandards #WebsiteMaintenance #TechExplainer #WebApps #WebStandards #WebSolutions #WebsiteManagement #mejbaurbaharfagun #MejbaurBaharFagun #MejbaurBahar #mejbaurbahar