By Mark Jackson , September 16, 2008
Every time a user or search engine spider visits a Web page, the server that page resides on returns a code. These codes show whether the page loaded correctly, was moved, or if there's a problem. Understanding these Web server responses to user and search engine requests is a critical aspect of SEO and Web site usability. Relay the wrong response, and you could create a world of hurt for your Web site in the search engines, or have some dissatisfied users on your hands.
Basic Server Response Codes
There are many different response codes, many that you will most likely never have to worry about. But there are a few that will keep coming up, which have the potential to make your life easier or more difficult. Here are the definitions of the basic server response codes.
200 -- OK. The request has succeeded. The vast majority of all requests should generally end with this response. In layman's terms, this means the request was understood, accepted, and the page you requested will appear.
301 -- Moved Permanently. The requested resource has been assigned a new permanent URL and any future references to this resource should use one of the returned URLs. Clients with link editing capabilities ought to change the existing URL to the new URL if it happens to rank for a given keyword. If the URL doesn't rank, and if the URL structure has many dynamic parameters, it may be wise to rewrite the URLs (using either ISAPI rewrite or Mod_Rewrite) to include keywords within the URL string.
When undertaking any rewrites of URLs, you should use 301 redirects to ensure that the SEO value of the existing URL is passed along to the new URL. In summation, this means the document has permanently moved to a new location, and search engines should reference the new location.
302 -- Found. The requested resource resides temporarily under a different URL. Since the redirection might be altered on occasion, the client should continue to use the old URL for future requests. This way, the search engines cache the old URL and not the new one. This keeps any rankings the page may have until you decide where you might want to permanently redirect this page. This is commonly referred to as "temporarily redirected," which means the document has moved to this location for a while. Search engines don't forget about the old location.
404 -- Not Found. The server has not found anything matching the request URL. No indication is given indicating whether the condition is temporary or permanent. The 410 (gone) status code should be used if the server knows that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server doesn't wish to reveal exactly why the request has been refused, or when no other response is applicable. See the common pitfalls below on how the misuse of these redirects can impact SEO efforts.
For more information and definitions on server response, check out the status code definitions on the W3.orgsite.
Common Pitfalls
Below are some of the common pitfalls in using server response codes, as this relates to search engine optimization:
Knowing the basics of server response codes and when to use them correctly is critical for any competitive Webmaster or search marketer. You can check your own server responses with many online resources including this status code checker. If you have any questions regarding redirects and content management system setup, contact a search marketing professional.
Mark Jackson is off this week. Today's column ran earlier on Search Engine Watch.