The dreaded 404 error is the scourge of most websites, in this blog posts I want to tell you how to re-purpose the 404 error and use it to your advantage.
404 is the error returned by web servers to browsers if a file cannot be found. This is a standard error and is usually a dead-end on a website.
You site will return a 404 for one of the following reasons:
Most WordPress themes have a page called 404.php, this is designed to handle any file not found errors and display a dull yet nicely themed message saying you went to the wrong page. What I want to suggest is that you take this page, and transform it into a springboard to other live pages on your site.
Editing 404.php required some coding skill, if you feel up to it, put on your code monkey hat, order a dozen pizzas, loose your social skills and follow me.
Why not add a search box to your 404 page this gives people the chance to search your posts for the title they want. Here is the code to add a basic search box to your 404.php file.
<form id="searchform" method="get" action="/index.php">
<div>
<input type="text" name="s" id="s" size="15" /><br />
<input type="submit" value="Search" />
</div>
</form>Another good way to springboard people to the content they want, or to bring your attention to the problem is to add a contact form. I use the plugin contact form 7, which does not support forms in themes, so I provide an email address to contact me on.
Why not give them something excellent ot read anyway, give them a list of your pillar content or your most popular posts. In my case I am using the popularity contest post plugins to display my most popular posts judged by the number of times a post has been read. To do this I add the following php command to my 404.php file:
akpc_most_popular()
I have implemented these on my own 404.php file you can see this in action by visiting wpdude.com/zzzzzz
A 404 is usually a dead-end, the wrong page to be on. Why not repurpose this into a useful experience for your site visitor. Push them to your key content or give them a call to action so they can find what they want, small actions like this turn casual visitors into subscribers.
If you need help implementing a useful 404 page, please contact me via my service page.