Most themes typically come with a 404.php page that shows up by default whenever an invalid URL is visited on your blog. Depending on how often you change the URL of existing posts or delete old posts, it may or may not be a high traffic page for your blog.

Either way, when a typical web surfer finds your blog and is greeted with the lovely 404 page, they will most commonly just click the “Back” button on their browser and continue browsing through the other search results. If your 404 page is setup correctly, you can often retain that traffic by either offering something funny to grab the readers attention or by offering a variety of methods for them to find the post they are looking for. Over at Theme Playground I ran across a great post about customizing your 404 page, which includes a bunch of suggestions for retaining that traffic.

I personally prefer to provide useful resources on my 404 pages, so I will typically use something like the following code to help search engine traffic hopefully find what they are looking for:

<h1>Not Found, Error 404</h1>
<p>The page you are looking for no longer exists.</p>
<p>Perhaps you can find what you are looking for by searching the site archives!</p>
<b>Search by Page:</b>
<?php wp_list_pages('title_li='); ?>
<b>Search by Month:</b>
<?php wp_get_archives('type=monthly'); ?>
<b>Search by Category:</b>
<?php wp_list_cats('sort_column=name'); ?>

I will also sometimes call the search box (usually searchform.php) and the popular posts plugin as well to help retain that traffic, depending on the type of blog the 404 page is being built for. How do you have your 404 page setup?

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching as a place to share hacks, tutorials, etc. Follow Kyle on Twitter @KyleEslick!

  1. K-IntheHouse says:

    I use the AskApache 404 plugin for WordPress. It’s hard to describe but you can see it in action here.

    It is supposed to give a SEO-boost as well as gives useful results to users from your site as well as Google in neatly tabbed interface!

  2. Marcio Gazetta says:

    Hi, I use this code in my blog, and i´m feeling happy with the result

  3. Toronto Guy says:

    On one of my other sites that has tons of old backlinks from various posts (its a dropped domain) I even threw up some affiliate ads on the 404 page that matched the old domain name.

  4. Dawn says:

    I use the Dunstan Style plugin for my 404 page, I love it based on you can see it in action on my site at


  5. Luis says:

    So good man.. you are doing a great job with this fantastic site

  6. Sam says:

    thanks ,i need it.

  7. moralde says:

    Hmmmm. So even the 404 page can be given better value. I think I’m gonna give it a try.

  8. ngemig says:

    I try it.. Thanks

Trackbacks/Pingbacks »

  1. says:
  2. SEO & Web Design » Blog Archive » Mastering Your WordPress Theme Hacks and Techniques says:
  3. 100+ Killer Wordpress Resources | Steffan Antonas' Blog says:
  4. Make The Error 404 Page Work For You | The Home Business Archive says:
  5. wordpress düzenleme ve ki?iselle?tirme yollar? « Bay Bedava – Netten Ba?l?klar says:
  6. wordpress düzenleme ve ki?iselle?tirme yollar? | Teknoloji Soka?? says:
  7. 10 Ways to Customize and Personalize your Wordpress Blog | SEO & Web Design says:
  8. Aju-lee » Archive » 10??????WordPressblog?????? says:
  9. 37 Cool Wordpress Hacks And Tutorials You Should Try | Afif Fattouh - Web Specialist says:
  10. 37?Wordpress???? | ??? says:
  11. WordPress Error 404 Pages: Essential Tips and Tools | DesignerLinks | Home to Web design news, jQuery Tutorials, CSS tutorials, Web Designing tutorials, JavaScript tutorials and more! says:
  12. WordPress Error 404 Pages: Essential Tips and Tools | #! Jack Script says:
  13. WordPress Error 404 Pages: Essential Tips and Tools | IdolMasti says:
  14. WordPress Error 404 Pages: Essential Tips and Tools | Internet Marketing Guru says:
  15. 404 Páginas Error WordPress: Consejos Esenciales says:
  16. WordPress Error 404 Pages: Essential Tips And Tools says:
  17. WordPress Error 404 Pages: Essential Tips And Tools | How It Easy (HIE) Computing community says:
  18. WordPress :Error 404 Pages: Essential Tips and Tools : says:
  19. WordPress Error 404 Pages: Essential Tips and Tools | says:
  20. WordPress Error 404 Pages: Essential Tips and Tools | | says:
  21. Cool Error 404 pages handling tricks | DesDevWeb says: