Updated June 7, 2011Doc Sheldon
This is a guest post by Mariana Fang Lin, explaining some of the common server response codes we all run into now and then.
Are you one of the many people who look at server response codes as some mysterious encrypted message left by servers just to confuse you? Are you clueless as to their basic meanings and don’t feel like it’s worth your time to learn these codes? Let me persuade you to give it a chance and get a basic understanding of what server response codes are saying. There are not that many codes that you need to memorize to get the basics and they’ll help you all along the way. So buckle down for a few minutes and read this article for server response code basics. These are some of the most important and most frequent ones you will likely come across.
The average webmaster and SEO should understand the basics presented here. See which codes are returned in a given URL and browser by taking advantage of server header checker tools like the age-old SEO Consultants tool.
Server Response 100 to 199
The server response codes from 100 to 199 are not going to be noticed by regular internet browsers.
Protocol Switch Accepted 101: Protocols are constantly switched on servers. HTTP protocols might be switched to something like a secure SHTTP protocol or and FTP protocol. This code is a good thing and means that things went smoothly.
Request Completed 100: This is a sign that things can proceed as normal and the request to the server was successfully completed.
Server Response 200 to 299
If a code is in the 200 to 299 range then it means that a request was completed successfully.
Again, like the codes in the 100 range, these mean that everything is working correctly and so you won’t normally see them when searching the internet.
OK 200: Everything is good and processed smoothly.
Created 201: After posting data from a form or using a CGI, a new resource was created without error.
Accepted 202: A request was taken successfully but it has not been completely processed.
These are the main three codes you should understand in the 200 ranges.
Server Response 300 to 399
Multiple Choices 300: This redirect is when it is pointing to more than one URL. It’s like it’s confused and doesn’t know where to take you to. Depending on the server’s settings, it might give you a choice of places you can go from there.
Moved Permanently 301: Of all the server codes discussed here, this is one of the most important ones that you should understand. If you’ve moved domains or if you’re changing the URL for a website then this is the server code you will want to use. This code is recommended by the search engines and won’t be penalized if used like some of the others.
Creating a 301 redirect can be quite easy. You can create an .htaccess file and include this code inside:
redirect 301 /oldurl.html http://www.newurl.com/newlocation.html
Just change the old URL by replacing it with your new URL location.
Also, if you’re using a CMS like WordPress you can find various 301 redirect plugins to make this process easier.
Moved Temporarily 302: If you’re planning to use a site in the future, but you want to forward a page or an entire site to a different location temporarily then you will want to use a 302 redirect code. These can be created the same way as a 301 redirect by just modifying the number to 302.
A 301 and 302 redirect are the most important codes to remember in the 300 range for SEO purposes.
Server Response 400 to 499
These codes are negative in the sense that they appear when the server’s request could not be successfully completed. Although these are errors made on the user’s side and they are not the server’s fault.
Bad Request 400: When bad syntax is used on a page it will cause this server code error to appear.
Unauthorized 401: This means that a request needs authentication. Make sure your username and password are correct. Access to the URL requires the user’s authentication, but the server thinks that the HTTP data stream was correct when it was not.
Forbidden 403: You might need authorization to access pages that show a 403 error. These are off-limits and forbidden without the right authorization.
Not Found 404: This error is very common for internet users. It simply means that a page could not be found by the server.
The page has probably been deleted or does not exist. A smart SEO strategy is to create custom 404 pages giving visitors options to other important pages that they can visit.
Request Timeout 408: This code signifies the server timing out and your request not getting through. This can happen especially when there is heavy traffic on that site. It’s best to just keep trying every few minutes to see if the server has recovered yet.
Server Response 500 to 599
Unlike the 400 errors which are errors beyond a server’s reach, 500 errors are errors that happen on the server itself.
Internal Server Error 500: This means that an unexpected error occurred within the server and your request could not be successfully completed.
Not Implemented 501: Contrary to the other 500 codes, this one is by fault of the user. This happens when your request could not be processed by the server.
Bad Gateway 502: If your personal server received an error from the server you are trying to connect to you will get this code.
Service Unavailable 503: This error can be due to a traffic overload or a site being down for maintenance.
Gateway Timeout 504: If there is a timeout on your server’s gateway then it’s a 504 timeout, contrary to the 408 timeout which is beyond your server’s reach.
There! That wasn’t so bad now was it? You’ve just taken your first step to understanding server codes. Keep trying to pay attention to them and you’ll get a good foundational understanding in no time.