The recently launched vista website (vistamaldives.com) was not properly indexed in most of the search engines for days. Hence, upon a search it was showing up the old pages, this means a lot of our customers will be directed to a page not found error, oops! We thought this will scare them and we don’t want that, as we are a good company. So I ran a test by visiting “www.microsoft.com/cool“, “www.cnn.com/cool” “www.bbc.co.uk/cool” to see what they are doing. Guess what, they have custom designed page not found (or error 404) page. Aha, this is exactly what I wanted. But how to do that? It came out to be fairly simple, 4 step process. Here is what I did (note: I have no idea if this works on IIS, but it works on apache).
Step 1. You will need a file called .htaccess in the root folder of your web server. So first create the file .htaccess. (Note: Windows Explorer will not allow to start a filename with a dot. Your options are to use command prompt to rename/create the file or upload the file in whatever name you want and rename at the server side).Step 2. Enter the following line in the .htaccess file using your text editor
ErrorDocument 404 /errors/404.html
Where 404 is the error code and /errors/404.html is the name of the directory/folder and file you want to be directed when a 404 error occur (note: I have a directory/folder called errors there).
3. Upload the .htaccess file to the web server root (top) directory/folder. (If you already have this file, than it is probably needed so try editing it, don’t replace it as some CMS uses this file. This means download the file in the server to your computer, edit it and upload. I am assuming you know what your are doing here).
Step 4. Design your error page relative to the file name used in step 2 and upload it to the proper folder.
This works like a charm, try this “www.vistamaldives.com/cool”
Now some tips on designing the error catching page. Just be creative but useful to the customer.
1. Don’t just redirect the customer to another page, like homepage, this is like devils work.
2. Explain what happened and give the customer options (but don’t be too tech).
3. Most well known websites give a search option, so if you have one, this is a good place to have it.
Some useful links
- Error 404 wiki Definition
- A site devoted to error 404 with some samples
- List of all error codes in the web world
- How to design a perfect 404 (advance stuff)
- Creating an error 404 page
- More advice on error 404
- A collection of creative error 404 pages
Good Luck with error 404