Turn A 404 Error To Your Advantage

Ongoing WordPress Support

Do You Need Help With Your WordPress Site?

Click through to the next page and learn more about our ongoing WordPress care plans.

Date

404 errors don't need to be a dead end, learn how to jazz up a stanard 404 page

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.

What Is A 404 Error

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.

Why Are 404s Returned?

You site will return a 404 for one of the following reasons:

  • Typo in the URL e.g. wpdude.com/aboutt instead of wpdude.com/about
  • The pages really does not exist e.g. wpdude.com/how-to-build-joomla-sites
  • You created the page, it got into the search engines indexes, then you took it down
  • You renamed the page

Create a Custom 404 page

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.

Add A Search Box

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>

Contact

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.

Give Up Your Pillar Content

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()

See It In Action

I have implemented these on my own 404.php file you can see this in action by visiting wpdude.com/zzzzzz

Don’t Make The 404 A Deadend

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.

2 thoughts on “Turn A 404 Error To Your Advantage”

    1. Neil Matthews

      You could do that, but you would miss problems on your site if the 404s are not recordded, and it may cause confusion if someone tries a type-in address and misspells,

      It would not cause any issues redirecting to the homepage though.

Comments are closed.

Ongoing WordPress Support

Do You Need Help With Your WordPress Site?

Click through to the next page and learn more about our ongoing WordPress care plans.

More
articles