Skip to content

Http Status codes

Imagine you're exploring the vast world of the internet, clicking from one webpage to another. Suddenly, you encounter a message that says "404 Not Found" or "500 Internal Server Error." Confusing, right? But don't worry, these messages are actually trying to communicate with you through what we call HTTP status codes.

HTTP status codes are like little notes sent from a website's server to your browser, letting you know what's happening behind the scenes. They're like the secret language of the internet, helping you understand if everything's working smoothly or if there's a hiccup along the way. Certainly! Here's a simple tabular format listing some of the most common HTTP status codes along with their meanings:

Status CodeStatus TextDescription
1xxInformationalRequest received, continuing process
100ContinueThe initial part of a request has been received
101Switching ProtocolsServer is changing protocols
------------------------------------------------------------------------------------------------------
2xxSuccessRequest was successfully received, understood, and accepted
200OKStandard response for successful HTTP requests
201CreatedRequest has been fulfilled, new resource created
204No ContentRequest processed, but no content to return
------------------------------------------------------------------------------------------------------
3xxRedirectionFurther action must be taken in order to complete the request
301Moved PermanentlyResource has been moved permanently to a new location
302FoundResource temporarily moved to a different location
304Not ModifiedResource has not been modified since last requested
------------------------------------------------------------------------------------------------------
4xxClient ErrorError on the client's part, such as incorrect request syntax or authentication
400Bad RequestServer cannot process the request due to client error
401UnauthorizedRequest requires user authentication
403ForbiddenServer understood the request, but refused to fulfill it
404Not FoundRequested resource could not be found
405Method Not AllowedRequest method is not supported for the requested resource
408Request TimeoutServer timed out waiting for the request
------------------------------------------------------------------------------------------------------
5xxServer ErrorError on the server's part, indicating a problem with the server's configuration
500Internal Server ErrorGeneric error message indicating server failure
502Bad GatewayServer acting as a gateway or proxy received an invalid response from an upstream server
503Service UnavailableServer unable to handle the request due to temporary overload or maintenance
504Gateway TimeoutServer acting as a gateway or proxy did not receive a timely response from an upstream server

This table gives you a quick overview of the different HTTP status codes and their meanings.

Waytojava is designed to make learning easier. We simplify examples for better understanding. We regularly check tutorials, references, and examples to correct errors, but it's important to remember that humans can make mistakes.