Personalize the error pages!

Let me ask you this question. How often have you altered the page structure of your website? How many times? 100 times? 1000 times? If you have a large website, the number of modifications can multiply quickly. This is especially true if you manage dynamic websites driven by a complex scripting language and a database.

Now let me ask you one more question. How many times have you typed code with “fat fingers” on the keyboard? I cannot speak for others, but I do so frequently. What occurs when writing hundreds or thousands of lines of code? Are you going to spot this minor error, or will your clients?

So, what happens when a link on your website is no longer active or when you make a typing error and a link cannot be located? Error pages are generated. The most prevalent is the 404 error. This error is generated by your web server software to inform the end user that the specified file cannot be located. This page does not contain a link to your website, which is a significant issue. And, unless you are the server administrator, it may not include your email address, meaning the user cannot notify you of the broken link.

There is a new trend among hosting companies to profit from your broken links. That is correct. They are profiting from pages that do not exist on your website! You may find this concept to be absurd, but I assure you that error pages are extremely lucrative. Consider the frequency with which end-users may “fat finger” when entering URLs. Let’s assume it occurs 1,000 times per day (although I’m probably being conservative). Multiply this figure by an average of $0.10 per click to determine how much credit the host receives when a user visits their “convenience page.” If you’re good at math, you’ve calculated that this equals $100 per day! Taking into account the size of the Internet and scaling this number accordingly, it is easy to see that this is a seven-figure industry.

What options do you have? How can you prevent your web host from profiting without your permission from your visitors? How can you get a piece of this extremely profitable pie? The solution is actually quite simple.

Most web hosting providers will permit you to modify at least a subset of the web server configuration parameters for your hosting account. I will demonstrate how to do this with Apache, the most popular web server software on the Internet. Similar steps can be taken for IIS or any other web server application, but I am confident that you can find the specific commands using Google.

Create a template for your error pages as the initial step. I recommend that you utilize your site’s basic layout to maintain consistency.

You must then determine what content to display on the page. You should inform your visitors that they have encountered a dead link, but you should also provide them with an easy way to return to your website. I suggest including the error message in the page’s title and at the top of the page using h1 tags. You should include a description of the error message in your page’s title and display it using h2 tags.


Error 404: The requested page could not be found.  Error 404 The page you requested could not be located. Verify the URL and try again.

Now you must offer a “one-click” route to your website. This is possible with a simple text link in the page’s footer.


Error 404: The requested page could not be found.  The page you requested could not be located. Verify the URL and try again.

Upload your template as error404.html to the root directory of your website (typically public html).

Create a.htaccess file with the following line using your preferred plain text editor and place it in the root directory (typically public html) of your website. This will ensure that the above template functions properly when a user encounters an invalid link.

ErrorDocument 404

Repeat the preceding steps, adjusting the file name and ErrorDocument statement for each error type for which you wish to provide a custom page. Google “Apache error codes” to acquire a comprehensive list of server response codes. (Modify as appropriate for your server software.)

As you can see, this procedure is extremely straightforward and takes no longer than five minutes. If you are proficient in HTML and have a Google AdSense account and other affiliate accounts, you can easily modify your template to include your AdSense search box and affiliate links. If you are truly savvy, you can use a free script such as CaRP (RSS to HTML converter) to provide relevant content on your error pages and increase the likelihood that the end user will visit your website.

Obviously, there is hope if you are not proficient with HTML but wish to retain your customers. I’ve designed a template that accomplishes the aforementioned tasks. You only need to modify a few variables in the code to complete the task. Simply search for MyErrorPages on my site. This is a free script that you may use on as many websites as you wish.

What are you doing on this page now that you understand how simple it is to customize your error pages and retain your valuable visitors? Personalize the error pages!

Leave a Comment

Your email address will not be published.