Bin-Blog logoBin-Blog

Learn about the latest in Web Development – as soon as I do.

Create a Better 404 Page in WordPress – Without Plugins

By • Jul 1st, 2009 • Category: Scripts, Tutorials, WordPress


Recently, one of my friends posted a list of plugins you can use to optimize your 404 page. In case you don’t know what a 404 page, its the page that shows up if the URL requested by the user don’t exist. He listed eight plugins to do this. And since I am working on the Plugin Killer series, it got me thinking – is it possible to do it without using any plugins?

Turns out, its easy. As long as you know about the Google’s 404 Widget. It adds a search box for your site with appropriate search suggestions and tries(and unfortunately, often fails) to provide alternatives to incorrect URLs.

See it in action here – The correct URL is – which the user finds and shows.

Enable Google 404 Widget in your Site

  • First, create the code by following the steps given in the 404 Widget page.
  • Then open the 404.php file of your wordpress theme and paste the code you got into it. Save and upload – you’re done.

This is the last of my plugin killer series. Just to balance things out, I’m thinking of doing a Plugin week(yes, a second plugin week) next week. Let me know if any of you are interested.

5 Responses »

  1. This was a cool series. Now that the series here is done, its my turn to extend it a bit furthur 😉

    A second plugin week? Hope you would remember the lessons you learnt during the first one. Good luck!

  2. Kurt Avish says:

    Interesting. Would atleast make the 404 page useful lol instead of just showing a message. A 2nd plugin week is much welcomed 🙂

  3. TheAnand says:

    It is a pretty cool service from Google to use. I used to have it on my previous theme. Thanks for reminding me!

  4. TheAnand says:

    yea, on a second thought, now i remember why I scrapped it from the new design…it does not work on sub domains 🙂

  5. Binny V A says:

    Just a note to all you guys. I am postponing the 2nd Plugin Week to next week rather than this week. Blame my busy-iness.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>