When you open a website, behind the scenes, your browser is constantly talking to web servers. This conversation happens through something called HTTP (Hypertext Transfer Protocol).
Every request gets a status code in response — like little sticky notes servers send back saying, “Hey, here’s what happened with your request.”
Let’s break down the most common categories of HTTP status codes
1xx – Informational
These codes mean “Hold on, we got your request and we’re working on it.”
- 100 Continue → The server is ready, keep sending more data.
- 101 Switching Protocols → The server is switching to a different protocol (e.g., upgrading to WebSockets).
2xx – Success
These are the happy codes you want to see.
- 200 OK → Everything went fine, here’s your content.
- 201 Created → A new resource was successfully created (often after POST requests).
- 204 No Content → Request worked, but nothing to show (common in APIs).
3xx – Redirection
These mean “Go this way instead.”
- 301 Moved Permanently → The page has a new home, and it’s not coming back.
- 302 Found → Temporary redirect, just for now.
- 304 Not Modified → Use your cached version, nothing has changed.
4xx – Client Errors
These are “you messed up” errors.
- 400 Bad Request → Your request doesn’t make sense.
- 401 Unauthorized → You need to log in first.
- 403 Forbidden → Even logged in, you don’t have permission.
- 404 Not Found → The most famous code — page doesn’t exist.
5xx – Server Errors
Now it’s the server’s fault.
- 500 Internal Server Error → The classic “Oops, something broke.”
- 502 Bad Gateway → Server got an invalid response from another server.
- 503 Service Unavailable → Server is overloaded or down for maintenance.
- 504 Gateway Timeout → Another server took too long to reply.
Why Status Codes Matter?
- Developers: Helps debug what’s wrong with a request.
- SEO Specialists: Search engines care a lot about how your server responds.
- Users: Well-designed error pages (like 404) improve experience.
Final Thoughts
Think of HTTP status codes as the traffic lights of the internet.
- Green (2xx) → Go ahead!
- Yellow (3xx) → Reroute.
- Red (4xx/5xx) → Stop, something went wrong.
Next time you see one, you’ll know exactly what the web is trying to tell you.

