Custom error documents (why is this good for SEO – hint broken links will still show content)
One very common use for the .htaccess file in your site’s root directory is the ability to redirect users who try to access a page which does not exist. While it is not absolutely necessary, using an error code proovides continuity to your visitors, and offers a much more professional look than allowing “file not found” errors to be processed by the server’s default response.
By default, most servers simply provide a header title which reads something to the effect of “Error 404 – File Not Found”. Most of us know how frustrating it is to get this page, because it not means we have failed to find the data we wanted, but we have also arrived a dead-end that offers little or no clickable way back to where we started. For many, this dead-end page is equivalent to a sign reading “go away”, and that is exactly what they do.. go to another site.
For SEO purposes, it amounts to the same thing. When a spider follows a link your site that returns a non-custom 404 error, the bot notes that the site is ill-managed, incomplete, or otherwise unusable. There is no disagreement about this particular facet of SEO.. a dead-end encountered by a crawler bot is more likely to abort the investigation of the site than to be a mere inconvenience. Just as a real live spider encountering an object it cannot get past will turn around and go in another direction, a spider bot is going to do the same. That is, regard the path as unnavigable, and go crawl another site instead.
To install a custom error page is a simple matter. Create an HTML or PHP, or even CGI script page that is displayed to the visitor which offers them a choice of methods to solve the problem. This page may offer a contact, or email address to report the problem, or simply redirect the visitor back to the top or referring page. How each site handles the situation is a private matter for the web designer to work out.
Next, save the page you created to the root directory of your site. It is not really a requirement for the page to be in the root directory, but this is the most common practice. In reality, the page can be anywhere, even on another server or domain (although using another domain introduces complications for spiders as well, and should probably be avoided).
If there is a file in your root directory titled .htaccess, load it into a text editor. If there isn’t a file by this name, create it. This is a straight text file which contains no HTML coding. We’ll talk more about .htaccess another time, and offer more uses for it, but in essence this is the way that the server where your site exists lets you make modifications to how your particular site handles certain situations. NOTE: the filename starts with a dot(.), and MUST be named in that manner.
There should be a line in the .htaccess file which reads something like:
ErrorDocument 404 /error_page.html
If there is no line that begins with “ErrorDocument”, create it. That is the server directive which tells the server how to handle that particular error. The second part of the line, “404″, is the “file not found” error. The last part of the line is the path and filename of the file to display when this error occurs. If the page you created earlier is in the root directory, this path should begin with “/”, as shown above, otherwise include the complete URL to the page you want to be displayed.
Remember, even if you don’t “think” you have any bad links, create this file anyway, just to be safe. This keeps the spider bots happy, and helps you increase your positioning in the various search engines.
Article written by SEOnotepad.com

No Comment Received
Sorry the comment area are closed for non registered users