Before getting into the topic let's quickly look what is HTTP and how it's work with a real-world analogy: -
Imagine you search a website or URL in your browser, then your browser sends your request to server. and server return requested data as a response. and that time HTTP come into play. your browser and server talk each other using HTTP protocol. HTTP stands for Hyper-Text Transfer Protocol.
Top 10 HTTP status code: -
200 (ok) - This status code use in successful request.
301 (permanent-redirect) - When a resource has moved permanently to a new location, the server responds with this code.
302 (Temporary Redirect): Similar to 301 but indicates a temporary redirection.
400 (Bad Request): Indicates that the client’s request was malformed or invalid. Common reasons include missing parameters or incorrect syntax.
401 (Unauthorized): The client lacks proper authentication credentials. It’s often used for protected resources that require login.
403 (Forbidden): The client doesn’t have permission to access the requested resource. Authentication won’t help; the server explicitly denies access.
404 (Not Found): Probably the most recognizable status code. It means the requested resource doesn’t exist on the server.
408 (Request Timeout) - when the server doesn’t receive a complete request from the client (usually a web browser).
500 (Internal Server Error): A generic error indicating something went wrong on the server side. It’s a catch-all for unhandled exceptions.
503 (Service Unavailable): The server is temporarily unable to handle requests. It might be due to maintenance or overload.
Except these status code, HTTP have more status code for various task. but these are the most common and most used status code use by Developers.