Keeping Visitors Through 404 Errors

Standart missing page
Standart missing page

Avoidugly error 404 pages that turn visitors away.  Givethem the option to stay on your site by giving thema custom error 404 page that looks and feels like

your site. Having a broken or old link gives a very bad impression and can lose you a customer before you have had a chance to impress them with your well-designed site.

An error 404 page simply means that the web browser could not find the file you requested.  This is termed as a "page not found" error.  The server generates an error (404), and enters it in the error log, then it returns the page that it is set up to return as standard.  These pages are usually very ugly and look nothing like your site, furthermore they look nothing like what the visitor was looking for.

How Do People React to Error 404 Messages?

The vast majority of web users are not technically knowledgeable and do not know what an error 404 message is. They simply know it is not what they were looking for and click back in their browser.  Some people know to go to the root of the domain but this is still not what they are looking for. The fact of it is that when most people see an error 404 page they think the site no longer exists and will simply go and find another site.

Why You Need an Error 404 Page

If you think that this does not apply to you consider the following:  In 2 years' time when you added several sections and changed names, etc., your site will have mutated into something else.  The fact is that mistakes can be made, links missed or spelled incorrectly and not checked.  Even if your site is perfect, someone can still put a link to your site and spell a file name incorrectly - giving a bad impression of your site through no fault of your own.

A custom error 404 page will help to keep a site visitor even if they turn up at a page that wasn't quite what they were expecting.  A custom error 404 page should tell the user where they are, what page they are on, the likely cause of being there and where they can go to find the information they require.  It is all about keeping that visitor and turning them into what they were before they got that error 404 - a potential customer.

What Shouldan Error 404 Page Look Like?

The last thing an error 404 page should look like is the standard or default error 404 pages. You should aim to make an error 404 page that looks and feels identical to your site, then with any luck most users won't even realise that an error 404 page has been generated and won't have a tarnished view of your site before they buy.

Use the same colors, logo, buttons, links and navigation as you use on your home page.  Then give the users a link to a search page, the home page or other important areas as well as giving them your standard navigation system.  With many options the user is far less likely to click back on their browser.  One important thing to note is that an error 404 document can be served in any directory - i.e. www.yourdomainname.com/PDF/engineering/marketing. This means that you should  always use explicit and full file names for any links, images, etc.

What Do the Error Codes Mean?

There is technically an error code, or status code, generated every time a request is made to a web server even if the request was successful. For example the status code 200 means ok.  Codes in the 200 and 300 range are generally successful requests that have a file returned. 400 errors are generally bad errors, which are either incorrect or bad requests. If you have access to your server logs or a good statistics package you can see how many error 404's are actually generated. On one site I maintain the stats package shows that for last week 1.3% of all requests are 404 errors. This may not seem like much but when that 1.3% means 38 requests you can see how many visitors you could be losing.

What Are theRequirements for Setting Up an Error 404 Page?

Ok, this is where it can get tricky. The requirements for setting up an error 404 page depend upon your set up and web server. Generally, you need to have administrator access rights to your server. As most shared servers (the most common type for small business web sites) do not allow you to have full administrator rights you may have a problem. Some good web hosts allow you administrator rights to your directory alone, this is very useful. If you are not sure about this ability ask your web hosting company, as they may be able to set this function for you.

How Do You Put Up an Error 404 Page?

An error 404 page is controlled by a file called .htaccess.  The dot prefixing the name is important.  It is also important to know that windows and Unix systems treat these files differently as the dot is a hidden windows file.  This is often apparent when you want to upload or change a .htaccess file as with some FTP (File Transfer Protocol) packages the file is not visible.  To get around this upload the .htaccess file as normal and it will overwrite the existing file.

Another problem here is that windows won't let you call a file .htaccess.  What I do is save and upload the file as htaccess.txt and then rename it once uploaded.

TemplateMonster missing page
TemplateMonster missing page
Making Your File

Now that all that's out of the way, here's how to make your .htaccess file.

  1. Open up your favorite text editor.

  2. Paste this code into the editor:

    ErrorDocument 404 / filename . html
  3. Save as htaccess.txt.

  4. Upload the file to the Top Root of your directory.

  5. Rename the file as ".htaccess".

  6.  Create and upload the error 404 document filename.html

  7. Type in an incorrect file path such as www.YourDomainName.com/does-not-exist.html

  8. Revel in your hard work

What Does it All Mean?

The .htaccess file used effectively can be a very powerful tool.  It can be used for far more than just creating error404 documents. In this case it simply tells the server that the ErrorDocument 404 is /filename.html rather than the default ErrorDoocument 404. If this command were not in .htaccess or if there was no .htaccess at all then the default 404 error document would be displayed.

The .htaccess file can be used to stop certain user agents from visiting the site e.g. - an annoying spider that won't obey the robots.txt file. It can be used in conjunction with .htpasswd to password protect a directory as well as many other things.

In Conclusion

Having a custom error 404 document may not seem like a big deal but when you consider that it needs no maintenance, does not cost anything and keeps your potential customers on your site becomes a smart move. By holding on to your customers you are keeping them on your site ready to buy from you, not your competitor. This is a classic example of the phrase "prevention is better than cure." 

The important things to remember are:

  1. Make sure you have the dot in the .htaccess file.
  2. Make your error 404 document look like every other page on your site.
  3. An Error 404 page stops bad and out-of-date links tarnishing your image and keeps customers on your site.

Related Articles

  • Common Website Mistakes
    There are so many websites on the Internet and the number rises every day. The level of professionalism in the websites varies so much between each website but what makes a good website? and what are the common errors people make?
  • PHP Debugging
    A few tips for debugging your PHP
  • Keeping Visitors Through 404 Errors
    Avoid ugly error 404 pages that turn visitors away. Give them the option to stay on your site by giving them a custom error 404 page that looks and feels like your site. Having a broken or old link gives a very bad impression and can lose you a customer before you have had a chance to impress them ...
  • Domain Name Registration - Changing Your Website URL
    Domain name registration is the most important step to take when setting up a website, although not actually the first step. The first step to take is to choose a good domain name!
  • Finding The Errors On Your Site
    When you are building your site, and try to test it in a browser, do you sometimes (or perhaps more often) get an error message telling you that your site contains a script error, and would you like to continue running scripts on the page - yes or no? If so, look at that screen before discounting...
  • Code Validation & Compliancy - The New Beginning XHTML
    Code validation is still widely debated as to whether it is required for performance within the search engines. It is only a guess that the search engines dont utilise it within their algorithm, but nobody is actually 100% sure on that fact...
  • Error Pages
    The standard error pages can be very annoying. When you move a page in your site, visitors have no way of finding where you moved it to in the error page. With custom error pages you can get cool error pages that have the same layout as your site and get rid of the standard ones and replace them wit...
  • Ten Of The Most Common Mistakes Made In Web Design
    Designers can keep more of their website visitors by avoiding common mistakes. The following list describes some of the most common design errors associated with websites.
  • How To Get Profits From Your '404 Page Not Found' File?
    Page Not Found on this Server. Check the URL and try again. Or Refresh the page...
    This is the annoying error that we will come across every time we surf the web pages. Internet will be changing every minute and day. The web sites that were here are not found next day...
  • 7 Benefits of HTML Validation
    You may not bother with html validation or writing simple and clean code when designing your web site. Later you may find your site is slow loading, appears incorrectly in the main browsers and does not rank well for the major search engines...

Contact Web Design Outsource and get started today

Need Website Designing, Development, Redesigning, Maintenance and SEO services or help growing your company's web presence? Request a free Quote Now.