Common HTTP Status codes 🧑‍💻

Yaasir
2 min readSep 21, 2023

--

When you browse the internet, you might not always notice the intricate web of communication happening behind the scenes. Every time you click a link or enter a web address, your browser sends a request to a web server, which responds with an HTML document that your browser then renders as a webpage. This exchange relies on a set of status codes to ensure smooth communication. These codes, sent by the web server in its response header, convey vital information about the success or failure of the request.

Let’s explore some common HTTP status codes you might encounter during your web adventures.

200 OK: This is the most common status code and signifies that the request was successful. When you see this, you know that the webpage loaded without any issues.

404 Not Found: Perhaps the most infamous status code, 404 indicates that the requested resource could not be found on the server. It often appears when you enter a URL with a typo or when a page has been deleted.

301 Moved Permanently: When a webpage or resource has permanently moved to a new location, the server responds with a 301 code. Your browser will then automatically redirect to the new URL.

403 Forbidden: If you encounter a 403 status code, it means you don’t have permission to access the requested resource. This can happen if you try to access a protected webpage or directory.

500 Internal Server Error: This generic status code suggests that something went wrong on the server’s side, preventing it from fulfilling your request. It could be due to various server-related issues.

302 Found (or 303 See Other): These codes indicate temporary redirection. Your browser will follow the redirect, but the original URL might still be valid in the future.

504 Gateway Timeout: This code indicates that a proxy server, often used for load balancing or security, did not receive a timely response from an upstream server. It’s a common issue when servers are under heavy load.

401 Unauthorized: When a webpage requires authentication, but you haven’t provided valid credentials, you’ll see this status code. It prompts you to enter the necessary login information.

These are just a few of the many HTTP status codes used to convey information about web requests and responses. Understanding these codes can help you diagnose and troubleshoot issues when browsing the web or managing your own web servers. The next time you encounter an error message while surfing the internet, take a moment to check the status code — it might provide valuable insights into the problem.

--

--

Yaasir
Yaasir

Written by Yaasir

I’m curious, and I enjoy work that challenges me to learn something new and stretch in a different direction. I do my best to stay on top of constant changes.

No responses yet