A Complete guide and list of HTTP status codes

0 4,606

HTTP status codes are cautionary indications from the server that get attached on top of a web page to display a message. But It’s never actually a part of the page. But then again, it is a cautionary message from the server indicating you about how things are functioning when someone requests to view the page that was received by the server.

The kinds of messages that are displayed whenever web browser connects with the server. You don’t see them all on a regular basis. Given the case that you’re a website developer or an owner itself then understanding HTTP status codes is mandatory as like HTTP 2 is now mandatory. Whenever they end up getting displayed. HTTP status codes prove to be a very significant tool for analyzing and diagnosing and fixing website related issues.

This little article enlightens you about the most common server status and error codes and tries to give you an idea about what’s happening on the server behind the scenes.

You must be wondering about what these codes are that randomly show up when the computer system is functioning. It might’ve triggered your interest as well when you saw these codes just randomly appearing out of nowhere. This is exactly what we are going to take a look on it. “Error: 404 not found” was the only native code most of us average Bobs knew our entire lives. Hopefully today, that’s going to change, and henceforth, by the end of this article, you will be able to decipher at least some of these codes not all in your day to day life. Now let us proceed without wasting time any further.

Every time you click on a link or type in a URL and press “Enter,” your web browser sends a request to a web server which then receives and processes the request and then finally sends back the requested resources along with an HTTP header.

HTTP status codes get delivered to your web browser in the HTTP header section. While the status codes are returned every single time, your web browser sends a request to a web page or resource. Most of the time you won’t be able to see them. It’s only when there’s an issue, and something goes wrong that you might see an HTTP status code displayed in your web browser. It’s the server responding to you – “There is an issue, or that something is not right. Therefore, this is a code that might explain what went wrong.Meaning of HTTP status codes

 

If you wish to view the status codes that your web browser does not usually allow you to view, there are many different handy tools that make it easy and convenient. The web browser extensions are made available for web developer-friendly browsers like Firefox and Google Chrome, and there are many web-based headers fetching handy tools like Web Sniffer.

To view the HTTP status code with one of these handy tools – Search for the line appearing near the top of the report that says “Status: HTTP/1.1” followed by the status code returned by the server.

The list of HTTP status codes is divided into five categories:

HTTP status codes is divided into 5 categories

  • 100’s: The Informational codes that indicate the request commenced by the browser is still being continued.
  • 200’s: When the browser request was determined to be received, understood and processed by the server without any issue, the success codes returned.
  • 300’s: When a new resource has been substituted or replaced for the requested resource, redirection codes returned.
  • 400’s: The client error codes are now indicating that there was an issue with the request made.
  • 500’s: The server error codes are now reporting that the request was accepted, but there is an error on the server that may have prevented the fulfillment of the request.

A variety of server codes exist and may be returned by the server within each of these categories. Every individual code has a particular and unique meaning.

There are over 40 different server status codes. However, there are fewer than a dozen that you’ll run into on a regular basis. If you’re running a website, get a good handle on these codes, and you’ll understand what you’re up against the vast majority of times that an HTTP status code rears its head.

Check out the list of HTTP status codes below:

200 HTTP Status Code

200 HTTP Status Code

  • HTTP status code 200: “Everything is OK.” This is the code that is delivered when a web page or resource acts exactly the way it’s expected to HTTP response body is perfect.

300 HTTP Status Codes

300 HTTP Status as multiple choice

  • HTTP status code 301: “The requested resource has been moved permanently.” This code is delivered when a web page or resource has been permanently replaced with a different resource. It is used for permanent URL redirection.
  • HTTP status code 302: “The requested resource has moved but was found.” This code is used to indicate that the requested resource was found, just not at the location where it was expected. It is used for temporary URL redirection.
  • HTTP status code 304: “The requested resource has not been modified since the last time you accessed it.” This code tells the browser that resources stored in the browser cache haven’t changed. It’s used to speed up web page delivery by reusing previously downloaded resources.

400 HTTP Status Codes

400 HTTP Status Bad Request

  • HTTP status code 401: “Unauthorized.” This is returned by the server when the target resource lacks valid authentication credentials.
  • HTTP status code 403: “Access to that resource is forbidden.” This code is returned when a user attempts to access something that they don’t have permission to access. For example, trying to view password-protected content without logging in might produce a 403 error.
  • HTTP status code 404: “The requested resource was not found.” The most common error message of them all. This code means that the requested resource does not exist and that the server does not know if it ever existed.
  • HTTP status code 405: “Method not allowed.” This is generated when the hosting server (origin server) supports the method received, but the target resource doesn’t.
  • HTTP status code 406: “Not acceptable response.” The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
  • HTTP status code 408: “The server timed out waiting for the rest of the request from the browser.” This code is generated when a server times out while waiting for the complete request from the browser. In other words, the server didn’t get the full request that was sent by the browser. One possible cause could be clear congestion resulting in the loss of data packets between the browser and server.
  • HTTP status code 410: “The requested resource is gone and won’t be coming back.” Similar to a 404 “Not Found” code, except a 410 indicates that the condition is expected and permanent.
  • HTTP status code 429: “Too many requests.” Generated by the server when the user has sent too many requests in a given amount of time (rate limiting). This can sometimes occur from bots or scripts attempting to access your site. In this case, you might want to try changing your WordPress login URL.
  • HTTP status code 499: “Client closed request.” This is returned by NGINX when the client closes the request while NGINX is still processing it.

500 HTTP Status Codes

500 HTTP Status Codes

  • HTTP status code 500: “There was an error on the server, and the request could not be completed.” A generic code that means “internal server error.” Something went wrong on the server, and the requested resource was not delivered. This code is typically generated by third-party plugins, faulty PHP, or even the connection to the database breaking. Check out our tutorials on how to fix the error establishing a database connection and other ways to resolve a 500 internal server error.
  • HTTP status code 501: “Not Implemented.” This error indicates that the server does not support the functionality required to fulfill the request. This is almost always a problem on the web server itself and usually must be resolved by the host. Check out our recommendations on how to resolve a 501 not implemented error.
  • HTTP status code 502: “Bad Gateway.” This error code typically means that one server has received an invalid response from another. Sometimes a query or request will take too long, and so it is canceled or killed by the server and the connection to the database breaks. Check out our in-depth tutorial on how to fix the 502 Bad Gateway error.
  • HTTP status code 503: “The server is unavailable to handle this request right now.” The request cannot be completed right now. This code may be returned by an overloaded server that is unable to handle additional requests.
  • HTTP status code 504: “The server, acting as a gateway, timed out waiting for another server to respond.” The system returned when there are two servers involved in processing a request, and the first server times out waiting for the second server to respond. Read more about how to fix 504 errors.

The list above explains most of the HTTP status codes you’re likely to run into on a regular basis. However, there are many additional codes that you might bump into from time to time. Two places where you can learn more about rare HTTP status codes that aren’t on this list are:

The comprehensive list of HTTP status codes from Wikipedia, and Status code definitions from the Internet Engineering Task Force (IETF). RFC 7231

Comments
Loading...