The 404 Error page is a page that we bloggers hope no-one ever gets to see. When needed we do have to make sure that the page is useful to the user who arrived there. This page comes into play when there is an error on the blogger’s side or on the user’s side. We could have a broken link on our site or the user could have mis-spelled something when navigating to a particular page.
Let me start by showing you what the 404-page on this site looks like.
Basics of a Useful 404 Page
Points to remember when building a 404-error page:
- Avoid the term ‘404-error’, most users do not know what this means.
- Do not blame the user for the mistake, try an apologetic approach, we do not want the user to leave our site and never return.
- Show the user what he/she entered before getting to the page. This affords the user the chance to spot any spelling mistakes on their side without telling them that their spelling is incorrect.
- Provide the user with some or other reason the error occurred.
- The user needs to get off the error page and find whatever he/she requires. Provide links to some useful pages or articles. If your site has a site-map this is normally an excellent link to include on the error page. My site does not include a site-map, woe is me!
- The home page is familiar ground to the user so add a link to the home page. Remember not all users realise that the site-title link at the top of the page returns them to the home page so offer a separate link.
- If you ask the user to undertake a search action you need to make sure that the search form is available on the page. My search form is not visible on the image shown but it is there, right next to the menu at the top of the page.
- Add the links on the page via widget areas to make it easy for the blogger to change these links when they feel like it.
How did I Build my Error Page
To start with I needed to register the relevant widget area(s). If you are unsure about how to do this a visit to the article Multi-Widgets will help. The mentioned article will also show you how to show the widgets added.
Once you have your widgets all set up all you have to do is to code the 404-page:
You will notice that at the end of this code I call a custom footer, not the normal footer. I need to show the 404 specific widget areas and not the normal footer widget areas on this page.
I hope you found this useful. Go and build a remarkable 404-page and then hope that nobody ever sees it.
Thanks for visiting.