Skip to Main Content
SEO Warrior
book

SEO Warrior

by John I Jerkovic
November 2009
Beginner content levelBeginner
496 pages
13h 46m
English
O'Reilly Media, Inc.
Content preview from SEO Warrior

Error Pages

If your website is using server-side scripting languages, chances are you have seen some error pages. In most cases, these error messages are very cryptic or technical and do not provide any help whatsoever. Imagine a web spider hitting a web page that is producing a cryptic error message. This is precisely what search engines will index: the actual error message instead of your desired content.

Different types of errors can occur. One of the most common is the 404 message, which says the page cannot be found. The next most common is the 500 message, which usually signifies a problem in your code. Another frequent message type is the 403 message, which occurs when someone tries to access a web page for which she does not have permission.

To help this situation, you can set up custom web pages to be shown when these errors occur. Although there are different ways to do this, I will mention the simplest one. This method uses the good old .htaccess file that usually resides in your web root folder.

With .htaccess, you can tell the server to display a special page to the user in case of an error. Ideally, this page should tell the user that something is wrong, downplay the fact that someone messed up (probably you as the webmaster!), and provide a set of links to the major sections of the site so that the user can at least look for what is missing.

Another use is to include a search form on the 404 page. In addition, you can tell the server to run a CGI script instead of simply ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The SEO Battlefield

The SEO Battlefield

Anne Ahola Ward

Publisher Resources

ISBN: 9780596804749Errata Page