HTTP Protocol v.1.1 Server Response Codes

Samuel Goldsmith
4 min readMay 3, 2017

--

By way of introduction:

I used to deal with clients and their emotions. Now, instead of listening to people talk, I communicate with computers and wait for them to respond. But a new issue has popped up, one which I didn’t have to worry about when dealing with the non-1’s-and-0’s: ‘Status Errors’. Like humans, computers ‘err’. But a computer error is different. It not only make me upset, but requires me to figure out what the heck the actual error is.

Being that this is my first ever blog, I thought I would start with something of an internet basic…HTTP errors and Status Code errors. What do they mean? Why do they happen? Understanding how to interpret status codes and error messages makes using the internet a more manageable experience. And unlike with those non-1’s-and-0’s, there is a precise fix. It either works it or it doesn’t; there is no middle ground.

So, what are the types of HTTP Error and Status Codes you may encounter while perusing the World Wide Web?

They are basically broken into ranges, with the first digit signifying the type of error (or status). A quick search will yield the following:

100–199 : Informational status error

200–299: Success status

300–399: Redirection status errors

400–499: Client errors

500–599: Server errors

Here is a description of the aforementioned ranges:

The 100’s

HTTP 100 was designed to allow for a more efficient use of network bandwidth. It allows for a server to confirm that it is indeed ready to accept a large request. Usually, a message is sent asking the server to reply with a 100 code. Then, you wait for a response before sending a (usually large) follow-up request.

The 200’s

This will rarely, if ever, be seen on an actual web page, since it means that a request was successfully requested, and content was transmitted back to the browser. To see a 200 status and confirm that it actually exists, you can open up the JavaScript console that comes with Google Chrome (command + alt + J on a mac) and click on the Network tab. Upon loading (or refreshing) a page, a number of files will appear with the status ‘200’ alongside them. This means everything is OK.

A status of ‘204’ means that while the server did send a valid reply to a client’s request, the response contains header information only (i.e. no message body). This allows for more efficient server responses.

The 300’s

A status of 301 means that a URI has been moved to a different location. A method called HTTP redirect is used, which allows for a new request to be made. The resource can be fetched from a new location automatically with the web browser following a redirect to a different URI.

The 400’s

This is a ubiquitous group of status codes. The big one here is 404. This one indicates that a web server could find a requested resource such as a file or document. While the network connection between client and server may have been successfully established, nothing was found at the targeted URI. A user must edit the URI in order to fix the problem, since either something was wrong with the requested one, or it doesn’t exist.

An HTTP Error 401 usually means that a resource requires some type of identification; a protected resource was requested, yet the client has not been authenticated for access. Most of the time, the solution is to login with a valid user name and password.

400 = ‘Bad Request’. There was an error detected from bad data being received by the client. It’s usually due to a technical glitch but may also be caused by data corruption on the network.

The 500’s

A status of 500 indicates that a client was unable to process an incoming request. The request may have been valid, but there was some technical issue with the actual server. To fix this error, the actual server must be fixed. (See learn.co, 5/1–5/2/2017).

Status 503 indicates that the Web server cannot process the incoming client request. It is also used sometimes to indicate expected failures due to administrative policies.

502 Bad Getaway: If you see this message, you know that there is a network issue between client and server. It can be due to a configuration error on a network firewall, router, or other network device.

Hopefully this post will make reading and understanding status errors more tolerable, and minimize the stress that comes along with them. You can follow this link to see all of the status codes. Now that you know what they mean, HTTP 100 to the next blog post.

--

--