Category: Server Technology

301, 404, 500 and Other Codes that make the Internet Run – Pt. 2

In yesterday’s post, I covered some of the web server status codes in the 1xx, 2xx, and 3xx ranges.  As a recap, here’s what the various ranges generally indicate:

 

1xx

Informational

2xx

Success

3xx

Redirection

4xx

Client Error

5xx

Server Error

 

400 Range Status Codes

Most of the 400 range status codes give verbose feedback in your browser, meaning they tell you straight up what’s wrong.  The first example of this is the 401 status.  This is when the client (you) tries to access something they’re not allowed to, otherwise known as “Unauthorized Access.”  This is what a typical Unauthorized status message looks like in Google Chrome:
status401

That status is very intrusive.  It disrupts the user experience and is actually a great idea to fix it.  This is the JadeServe 401 status page, that still gives access to the menu and creates a seamless experience:
status401-fixed

Another common 4xx range status is 403.  This is USUALLY because you tried to view a directory on a web server that doesn’t have a default index file in it.  In Google Chrome, this looks like:
status403

Again, like the 401 status, this is very intrusive and no one likes that.  It’s best to fix this to another custom error page so your users have the absolute best experience.
status403-fixed

The most famous of all status codes is the infamous 404 – File Not Found.  Nine times out of 10, it’s because someone typed the URL wrong.  The rest of the times is because of stray, forgotten links on your site.  If you have a lot of 404 errors, you should definitely look into the cause of them.  This is another error message that you can mask with a custom page, so your users aren’t distracted by them, and with a custom page, you can include error logging, and be informed whenever the errors arise.  This will help troubleshoot issues with your site and make your users happier in the long run.

Not a common status code, but notable is code 418.  This is an official status code for “controlling, monitoring, and diagnosing coffee pots.”  This is a true status that was officially put into place April 1, 1998, and is officially, thoroughly, documented in RFC 2324, and is worth a read.

The final 4xx error that will be discussed today is 451.  This is a special error code that means the selected resource was pulled down for legal reasons, including national security, copyright infringement, privacy laws, or by court order.  If you come across this error, you should probably leave the site post haste.  As a small bit of trivia, this error code actually received its name from the banned book Fahrenheit 451.

500 Range Status Codes

This range of status codes is reserved for server and misconfiguration errors. 500 is literally for “Internal Server Error.”  This is usually for coding errors.  This is a verbose error that generally looks like:
status500

Like this says, you can find out more in your server logs about precisely what the error is from.  If you notice your server logs are getting large, it’s something that should be looked into.

The final status code that we’re going to discuss if 503.  This means that the server is overloaded or down for maintenance.  If you see this error, you may want to look into code optimization, hardware upgrades, or see if the maintenance flag was set on the server accidentally.

 

These status codes are tools to help diagnose and fine tune your website for the best possible user experience.  All of these status codes can be diagnosed and corrected by JadeServe.  When the server runs well, your business runs well.

Share This:

301, 404, 500 and Other Codes that make the Internet Run – Pt. 1

Every time you browse to a website, the server sends back a status code, telling the browser what to do.  It can signal the browser to go somewhere else, like a cop directing traffic.  These codes can signal that there was an error with the server and the file couldn’t be accessed.  They can also signal invalid permissions, because of an invalid password.  We’re gonna cover a few of the common server status codes today in the 1xx, 2xx, and 3xx range today.

Here is a table about the basics of what the codes are for:

1xx

Informational

2xx

Success

3xx

Redirection

4xx

Client Error

5xx

Server Error

 

100 Range Status Codes
These really aren’t used anymore, except to tell the computer to keep on doing what it’s doing.  It’s more of a “carry on”, but they’re not used anymore, so we won’t discuss them too much.

200 Range Status Codes
The most common response code on the internet is 200 – OK.  It tells the requesting computer that everything went alright, and the file was properly served.

status200

The next common 200 range status code is 203.  This is found mostly on proxy services where everything went alright, however the content that your computer is receiving is NOT what the server originally sent, meaning the third party has changed some of the content.  This is when you use a proxy and they add branding to the bottom of the page, or something like that.

204 is a common code meaning everything went okay, however the file returned was empty, so there was no data to return.  This may be because the file was left accidentally empty or because the file wasn’t needed for the page returned, and an empty file was returned.

status204

Finally, to wrap up the 2xx range, there is 206.  This is a partial file, usually because a download is paused or interrupted.  This can also be because only a part of the file is needed and the server knows ahead of time which part that file is.  It is not very common, but if it’s encountered on your web server, it is worth investigating the cause.

300 Range Status Codes
301 is the most common 300 status code, which is for a permanent redirect.  This is commonly used to transfer traffic from a non-www URL to www, or transfer from http to https.  This is commonly used for SEO because search engines see www and non-www traffic as two separate sites, and your site may lose standing for having duplicate traffic.  This is an extremely important status code to understand because of all that it can accomplish.  It can also redirect mobile traffic to a mobile subdomain or folder for sites that are optimized.

status301

304 is another common status, which basically tells the client that there was another version of the file that was available in cache, and that there was no change, so the client will be receiving the old version.  This can greatly speed up traffic on your site because some items, like images or CSS files may not change that much, so there is no point in serving a new copy of the file, when a cached version is available.

status304

 

This wraps up today’s little post on some of the common HTTP status codes.  Learning how these interact with clients and servers can help you troubleshoot issues and make your servers run more efficiently.  JadeServe can help if issues crop up, or you get errors you don’t understand.

Share This:

Powered by JadeServe