404Regardless of whether your goals is to educate or entertain, there is bound to be a time when someone hits a “404 Error” on your website. Perhaps they typed a link in the address bar incorrectly, maybe someone linked to your best page with a space or hyphen where it didn’t belong. 404 – It happens.

You do however have a significant measure of control over WHAT happens WHEN a 404 is experienced. A moment of frustration can be turned into a laugh, a smile of appreciation or perhaps even inspiring an action/exploration that the reader had not considered. The choice of how the 404 error is handled on your domain is up to you.

A quick search and you can find dozens of great examples of how to treat your website visitors right in this scenario:

These will give a a good start on the hunt for inspirational 404 error options and links to other ideas and tutorials on what is next.

What You Need To Do:

Part of the reason for writing this up is personal. I wanted to do something about the 404 and was looking for methods that could achieve helpful results. With a WordPress powered website there are several options.

Option 1) Create or edit your 404.php template.

Update this file with your own custom message, links and imagery. A good WordPress theme comes with this template already coded – simply waiting for your custom code. What to do if your theme does not have a 404.php template? Change to a better template or, read up on the codex regarding the 404.php file and create your own. The basic 404 template can be as simple as the default theme 404.php file:

<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */ ?>
<?php get_header(); ?>
  <div id="content" class="narrowcolumn">
    <h2 class="center">Error 404 - Not Found</h2>
  </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

You can duplicate this 404.php template in your default theme and upload it to your current theme. This is a good option if the page.php template of your site has the header/content/sidebar/footer in the same order as the default theme. If not, duplicate the page.php of your current theme and use the above to guide you in the process of removing the_loop and unnecessary php from the 404 template. (theall the php code except the call for the header, footer and sidebar if theses calls exist in your present page.php template).

Joost offers a very insightful guide to 404 including the above method here.

Option 2) Install the Smart 404 WordPress Plugin.

Installation of this plugin requires editing your 404 template file “404.php” and results in a “Smart” presentation of related/helpful options for your visitors. Here is the authors’ description:

When a page cannot be found, Smart 404 will use the current URL to attempt to find a matching page, and redirect to it automatically. Smart 404 also supplies template tags which provide a list of suggestions, for use on a 404.php template page if a matching post can’t be immediately discovered.

Michaels’ plugin and instruction for setting up the Smart 404 can be found here.

Option 3) “Widgetize” Your 404 template.

Registering a new widget and updating your WordPress “404.php” template allows you to present a custom message when a person hits your 404 Error page through managing a 404 widget in your WordPress dashboard. In this way you can leave the boringly predictable default “404 Not Found” statement. You could get smart, helpful or just plain fun with a custom message on your 404 page. Justin Tadlock has written an easy to understand article to help you accomplish a widgetized 404 page.

What You Need To Know:

Serving your readers with helpful information – the kind they are looking for is the point. There are several technical aspects to doing this well and others have written some excellent rundowns for taking your 404 settings to a level that allows you analyze and track what people are finding – or TRYING to find on your site. Be sure to read Joost’s article covering some “Must Know” details about how the 404 works, what is required and how to analyze what is happening with your 404 errors pages.

More content you may find helpful:
  1. more on Custom Error Pages
  2. Back Up Your WordPress Website
  3. Send a PDF using your WordPress website and email list
  4. Send Photos Email and spare your friends’ the extra weight

Tags: , ,