How to Create an Informative “404 Error” Page Photo by brionv

How to Create an Informative “404 Error” Page

by Alex · 59 comments

Believe it or not 404 error pages are a very impor­tant part of your web­site. Just because it’s (hope­fully) the least viewed page on your blog doesn’t mean it shouldn’t be paid atten­tion to. The rea­son why it is so impor­tant is because it serves as a gate­way for lost and mis­guided users on your blog.

You should always work your hard­est to never let a user see a 404 page (unless it’s their fault they see it), how­ever you need to be sure that you have a func­tional and infor­ma­tive 404 page, so when some­one does see it they get back on track.

Before you start mess­ing with your 404 page, or even before I really get into fur­ther detail, you need to remem­ber the K.I.S.S con­cept (Keep it Short and Sim­ple, or Keep it Sim­ple, Stu­pid). That’s basi­cally say­ing to keep your design sim­ple and away from any­thing that may serve com­plex. So just remem­ber that through this post.

The 2 Kinds of 404 Pages

I can cat­e­go­rize 404 pages into two dif­fer­ent sec­tions. Which of the cat­e­gories can you clas­sify your 404 page in?

The Good 404: Pages that are full of infor­ma­tion that will help peo­ple get around the blog and find what they thought they were going to.

The Bad 404: Gen­er­ally pages that are a waste of space, and basi­cally show no inter­est or care for why a page on THEIR blog is not work­ing. Usu­ally you will see this neg­a­tive sound­ing “Sorry, but you are look­ing for some­thing that isn’t here” mes­sage and a search box if you’re lucky.

What are you?

So, which kind of 404 page do you want on your blog? The 404 page that says “Dude, you’re on your own”, or the page that says “Here, let me help you with that”. Take a look at your 404 page right now, and see which of the cat­e­gories you fall into. I seri­ously hope you are in the “Good” category!

Note: Most of the infor­ma­tion below will be directed at users with blogs pow­ered by Word­Press. How­ever, non Word­Press users can still take infor­ma­tion from this arti­cle and put it to use at their own blog.

Ways you can make your 404 page more helpful

There are cer­tain things I feel should be included on every blogs 404 page. Every­thing I list will all be focused around the idea of “deliv­er­ing use­ful con­tent to some­one”, and of course how to carry out the spe­cific action on the page itself.

1. Recent + Pop­u­lar Posts

A no-brainer, and the first thing that should come to mind when cre­at­ing a 404 page. I can under­stand if you are skep­ti­cal on adding these things to your 404 page though. I guess you can say there is more per­ti­nent infor­ma­tion to be added to the page, but I find that adding this infor­ma­tion can help peo­ple find extra infor­ma­tion they weren’t nec­es­sar­ily look­ing for before (which is a good thing).

Add Recent Posts to your blog with or with­out a plugin

If you want a plu­gin for this, check out the Recent Posts Plu­gin. It’s def­i­nitely the best avail­able, and lets you cus­tomize the out­put of the plu­gin in nearly any way you want.

For some peo­ple, it is their goal to use as less plu­g­ins as pos­si­ble. A very under­stand­able goal, and many of us should try and do the same. So I did a lit­tle reasearch, and found a sim­ple way to show your lat­est posts on your blog with­out a plu­gin. Just paste this code wher­ever you want it to appear:

<ul>
  <?php $recent = new WP_Query("showposts=5"); while($recent->have_posts()) : $recent->the_post();?>
    <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
  <?php endwhile; ?>
</ul>

You can edit the num­ber of posts shown by edit­ing the value “5” to how­ever many you like.

Code Found At Webdemar.com

Pop­u­lar Posts (Plu­gin + No Plu­gin Options)

I rec­om­mend the pop­u­lar posts plu­gin from Rob Marsh (same author of the Recent Posts plu­gin above). It has the same amaz­ing options as the Recent Posts plu­gin does. Down­load it.

Paste this code wher­ever you want pop­u­lar posts to display:

<h2>Popular Posts</h2>
<ul>
<?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post->ID;
$title = $post->post_title;
$commentcount = $post->comment_count;
if ($commentcount != 0) { ?>
<li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>">
<?php echo $title ?></a> {<?php echo $commentcount ?>}</li>
<?php } } ?>
</ul>

You can edit the num­ber of posts shown by edit­ing the value “5” to how­ever many you like.

Code Found At ProBlogDe­sign

2. Search Box

Such an obvi­ous thing to do, yet one of the most impor­tant things to add to your 404 page. You can’t expect the post the user is look­ing for will be in the “Recent Posts” or “Pop­u­lar Posts” sec­tion. You need to add a Search form so peo­ple can look more in depth of your blog.

This is the code I use for the stan­dard Word­Press search:

<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
	<input size="20" type="text" value="Search..." onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" name="s" id="s" />
	<input type="submit" id="submit" value="Search" />
</form>

The neat thing about the code above is it will have the default “Search…” text, but when the user clicks on the input box, that text will dis­ap­pear. A neat lit­tle effect I think. :)

3. Con­tact Infor­ma­tion + Sub­scrip­tion Options

These are impor­tant too, more impor­tant than you think actu­ally. Both of these options are pretty much ways to get the user more involved with the com­mu­nity, but more specif­i­cally: you.

Why con­tact infor­ma­tion on 404 pages are useful

You should give users an option to be able to con­tact you to look for a post. You can either direct them to your con­tact page, or set up a cus­tom con­tact form right on the page.

So with a con­tact form, a user has the option to send you an email and ask if the post exists, and if you can find it for them. Or, it could be a sim­ple notice that a page is bro­ken. It’s a win win sit­u­a­tion for you, because you either get to help a user out, or you will be alerted of a bro­ken URL on your blog.

Link to your Feed. Why not?

This is kind of a “Why not?” kind of thing. I think that if you put a URL to your RSS feed on your 404 page and ask peo­ple to sub­scribe in an invit­ing man­ner, they can feel more part of the com­mu­nity. I know how it sounds, invit­ing some­one to fol­low your blog from a bro­ken page can be weird. But I feel it is very beneficial.

Quick Sug­ges­tion: Add some extra invit­ing text to your RSS link. It’s on a 404 page, so I think if you say some­thing like “Sub­scrib­ing to our RSS Feed is a great way to stay up to date with our blog” and basi­cally promis­ing them they won’t have to ever see that page again if they sub­scribe. Sounds like good idea, right?

Exam­ples of very infor­ma­tive 404 pages on blogs

Do you want to see an exam­ple of some cool 404 pages? Take the pages listed below as an exam­ple of what it means to have a great 404 page:

ProBlogger.net

ProBlogger.net

ThouShallBlog.com

ThouShallBlog.com

Blogsessive.com

Blogsessive.com

SmashingMagazine.com (Extremely Awesome by the way)

SmashingMagazine.com (Extremely Awe­some by the way)

Other Tips

  • Down­load Ran­dom Posts by Rob Marsh. Every time the page is accessed, a ran­dom post can be dis­played in the same for­mat as Pop­u­lar posts or Ran­dom posts.
  • Don’t put too much blame on the user. Basi­cally, don’t be mean about it. I know peo­ple like to be funny and add lit­tle jokes but don’t overdo it.
  • Speak­ing of being funny and jokes — Add per­son­al­ity. Like on any other post or page of your blog, per­son­al­ity is key.
  • Link to the home­page of your blog. Get your read­ers off of that 404 page, and direct them to the real content.
  • If you need help cre­at­ing a 404 page, check out the Word­Press Docs.

Go to top

Article by Alex

I'm the 17 year old blogger & designer behind Blogussion. I live in New Jersey (but root for the New England Patriots), and am a Junior in High School. You can check out my rarely updated personal(ish) blog, Asnio, or connect with me on Twitter.

  • Summary

    404 pages are one of the most important places on your blog. You need to keep a user interested in staying on your blog to find information. Whether they are looking for specific information, or anything - throw as much information as you can at them.

  • Key Points

    • There are two kinds of 404 pages - Informative and Uninformative. Try to add a lot more than just a simple search box to your 404 page.
    • Adding recent and popular posts to your 404 page is a great way to help your readers navigate through your blog. You can add both of these things with either a plugin or without a plugin.
    • Add a Search box to your page so people can look for information by the keyword.
    • Add contact information so people can contact you if they can't find something. Try to find the post for them if they contact you about it.

From Planning to Earning

A free course that explains all you need to know about maintaining and building a powerful, money making blog.

Information is delivered through a beautiful web guide & a 10 day email course (+ a weekly newsletter). Sign up, or learn more!

Willblogforfood April 6, 2009 at 6:01 pm

That’s one thing i have been meaning to do for a long time. I just threw together a new custom 404 page its very little work and it will do wonders for your site and the people lost on it.

Reply

Alex April 6, 2009 at 6:19 pm

You’re right, it doesn’t take much to make a 404 page. Just copy and paste some code snippets, maybe add a few plugins and you’re set. :)

Reply

Nicolas Prudhon April 6, 2009 at 6:16 pm

Very good post Alex, and the code snippets you give will be very useful I believe.
BTW, I have finished to “revamp” my blog too.

Nicolas Prudhon’s last blog post..Video About the Benefits of Human Visitors Optimization

Reply

Alex April 6, 2009 at 6:20 pm

Your blog looks awesome man. I like the gray background on the title. Great job with it. Did you make the whole theme yourself?

Reply

Nicolas Prudhon April 6, 2009 at 8:14 pm

Thank you, coming from someone as neat as you, it’s much appreciated!

Yes, I did the theme myself, so I have spend the last week between Photoshop, Dreamweaver, and my FTP program… since I was doing this live, my blog did look kind of weird from time to time when I was doing some “unsuccessful” experiments…

Nicolas Prudhon’s last blog post..I have lost my ranking in Google!

Reply

Alex April 6, 2009 at 8:24 pm

That’s cool Nicolas, I didn’t know you were into all of that stuff. Just thought you were an SEO guy. :p

Reply

Nicolas Prudhon April 6, 2009 at 8:29 pm

Ha ha ha! No, I’m more of an “all-in-one” computer guy, but I have specific interest in SEO I would say. Anyway, today to be any good at what we are doing, we need a more general knowledge in my opinion.

Nicolas Prudhon’s last blog post..I have lost my ranking in Google!

Reply

Evan April 6, 2009 at 7:35 pm

Never thought about this before, and never tried it, but I will deffinitely set up a “good” 404 page when the time comes! ;)

Reply

Nicolas Prudhon April 6, 2009 at 8:16 pm

Evan, at least you got an excuse… but many out there know about that but just tell themselves: “great, I’ll do that later when I have time”. Somehow, they just never tend to have time…
My best advice to you is just go ahead and do it now, it takes just a few minutes!

Nicolas Prudhon’s last blog post..I have lost my ranking in Google!

Reply

Dennis Edell April 6, 2009 at 7:39 pm

I’m in the bad seat. lol. Bee meaning to do this forever but just noticed, I don’t have a 404 page in my theme??

Btw, a contact link is good even for the simple reason of allowing a conscientious visitor to contact you about the fact that pages are mucked up….I have a few cool readers like that.

Dennis Edell’s last blog post..9 Qualities You Should Find In A Good Web Designer

Reply

Nicolas Prudhon April 6, 2009 at 8:19 pm

I know what you mean Dennis! At least for the WordPress users, there’s a default 404 page. Though not a good one, it’s still within your blog template which is much better than having the horrible blank page from Internet Explorer (in example), it comes up like a death sentence…

Nicolas Prudhon’s last blog post..I have lost my ranking in Google!

Reply

Dennis Edell April 6, 2009 at 7:40 pm

I see you need the edit comments plugin. lol

Dennis Edell’s last blog post..9 Qualities You Should Find In A Good Web Designer

Reply

Alex April 6, 2009 at 8:49 pm

Cool idea Dennis, ask and you shall receive. :D

Reply

Kai Lo April 6, 2009 at 8:55 pm

How would I do this for Blogger host? I hate being an oddball here :(

Kai Lo’s last blog post..Avoid Google Slap – Pagerank Penalty

Reply

Miami web design April 7, 2009 at 1:46 am

Good post Alex , 404 pages should not be ignored .The best way I would think is to redirect it to my homepage .And By the way it looks strange you toolbar PR has not increased this time (although its not that important)But even after that I was expecting atleast 4 for this blog

Reply

Alex April 7, 2009 at 5:24 am

We changed the URL of the blog, so all of the PR would be at http://www.blogussion.com/blog/. Haven’t checked what it would be yet, but I think I will just for fun.

Reply

John @ Professional Web Design April 7, 2009 at 2:52 am

Thanks man! I never knew I could maximize the 404 pages. I was looking for tips because I keep on getting the 404 pages.

Reply

Alex April 7, 2009 at 4:33 pm

If you get a lot of 404 pages, seriously look into fixing that. It’s really bad for your traffic, regardless of how awesome your 404 page is.

Reply

teenwebguru April 7, 2009 at 9:26 am

Good long posts Alex. I think i’m going to add some descriptions to my 404 error pages.

teenwebguru’s last blog post..My Step by Step List

Reply

Alex April 7, 2009 at 4:30 pm

Awesome man, let me know how it goes!

Reply

Harish April 7, 2009 at 10:00 am

Great post Alex. I have never known that there are even two types of 404 pages too. I think I have a good 404 page. Thanks for the post. It was interesting :)

Harish’s last blog post..Why You Should Promote Your Contest? And How ?

Reply

Alex April 7, 2009 at 4:32 pm

No problem Harish, glad you liked the post.

I checked your 404 page out, all I saw was “The page you trying to reach does not exist, or has been moved. Please use the menus or the search box to find what you are looking for.” Maybe you want to add a few things to it when you get some time? ;)

Reply

Harish April 8, 2009 at 10:01 am

sure Alex. Thanks for the mention.:)

Harish’s last blog post..Why You Should Promote Your Contest? And How ?

Reply

Simon | Teenius April 7, 2009 at 10:58 am

Nice post, Alex. If I’m honest I’ve never even thought about my 404 page, but will definately sort it out. At the moment I’ve just got one saying ‘Sorry, the page you’re looking for cannot be found’. Hmm, will definately sort that out :D

As a quick side note, is there anything we can do to help with SEO?

Simon | Teenius’s last blog post..Interview with Alex Fraiser (15 Year Old Blogger)

Reply

Alex April 7, 2009 at 4:31 pm

How do you mean? Like, how can we effect SEO on our 404 page? I don’t see any way if that’s the case.

Reply

Enk. April 7, 2009 at 4:50 pm

Once again a cool, effective post there Alex. I’m a little dis-hearted ’cause I myself was going to write something on 404 Page.. well no matter, I’m still going to write it.. :P

@ Simon,
No dude, 404 and SEO. Don’t meet anywhere. Point is if you are showing some recent posts or something like that, you just have to take care of Follow / No-Follow thing. Correct me If I’m wrong.

Enk.’s last blog post..Create Custom Sidebar in Wordpress Blog

Reply

Alex April 7, 2009 at 4:52 pm

Don’t be discouraged Enk, I’d love to see your post about it! Let me know when you write about it man. Comment it here, email it to me, send a trackback ( ;) ), whatever you have to do.

Reply

Enk. April 7, 2009 at 5:00 pm

I’m sure gonna tell you :P I’m also going to make it sure its bit different .. :D

Enk.’s last blog post..Create Custom Sidebar in Wordpress Blog

Reply

Miami web design April 8, 2009 at 12:28 am

404 pages are good for your SEO .For eg :- if you was having a page on your website and there were 4 websites linking to that page .It means you were getting 4 links for that page . Now if that page don’t exist on your website then what would happen to that link
juice ? either you can contact those websites telling them to modify there links and point them to new page or you can do a 302 redirect of that 404 page to your home page passing all link juice of that page to your homepage .

I hope it would clear your doubts

Gagan

Reply

Da brush April 14, 2009 at 9:39 am

Interesting tips, I should rework my 404 pages with some content and links to redirect my traffic.

Da brush’s last blog post..Paris Metro Map Brushes

Reply

Nokia Mobile Talk April 28, 2009 at 9:30 am

Hey guys here is my 404 page, tell me what you think please

Nokia Mobile Talk 404

Nokia Mobile Talk’s last blog post..15 Twitter clients for your Nokia smartphone

Reply

Jenny July 7, 2009 at 9:24 am

Hey, just stopping by from stumble. Great post. :) I’ll be back to read more of your updates. You seem to have a very interesting bloggy.
Jenny´s last blog ..Dear Reader vol. #1

Reply

Alexander Bickov July 14, 2009 at 5:01 am

For your post theme my own error page 404 idea http://www.kontain.com/bickov/entries/36756/page-404/

Reply

Santiago November 5, 2009 at 4:29 am

A very cool and useful 404
http://www.cuoma.com/404
Santiago´s last blog ..Disponible blacksn0w y blackra1n RC3

Reply

Bible Money Matters November 9, 2009 at 12:33 pm

My 404 page uses a wordpress plugin called Smart 404 that basically looks at the url the user was trying to go to, and then suggests possibilities of posts they might have been looking for on the 404 page. It also gives the option of using the search box or looking at our post archive to try and find what they’re looking for. It seems to work pretty well.
Bible Money Matters´s last blog ..The Great Big List Of 75 Budgeting Tools, Finance Softwares And Iphone Money Apps

Reply

Kendin Tasarla February 18, 2010 at 7:55 am

There’s a free WP plugin that does the job well. And never run out of visitors and all the traffic ever need.

Reply

Web Hosting UK March 8, 2010 at 11:26 am

Informative post, customization of your 404 page is the first step when improving your error page.

Reply

Personal Finance April 23, 2010 at 6:54 pm

Hi Alex,
Thank you so much for the easy and most understanding article. I implemented your suggestions. Please check it if you will please. Is the format correct?
Please check it here.

Thank you so much for such an informative and beneficial article.
Personal Finance´s last blog ..Tips to get your career going in four explosive industries

Reply

Web Design Ideas May 17, 2010 at 1:32 pm

Great post, it’s nice to see someone giving out advice rather than just saying how important 404 pages are.

great work

Reply

Arai RX7 May 25, 2010 at 9:46 pm

Your suggestions have really helped us at our site. Thanks for posting.

Reply

Trafficke SEO Consulting Services June 5, 2010 at 2:14 pm

I usually leave a site when I see a 404 page, but if it is interesting and informative, I may choose to stay find new content. So it’s important, in my opinion, to have a good 404 page. I use a Wordpress plugin on one of my sites to do the job. Great post!
Trafficke SEO Consulting Services´s last blog ..Correctly Writing An Optimized Page Title & URL

Reply

Lisa June 16, 2010 at 11:12 am

very interesting, i have seen 404 page with funny picture and it make me laugh :)

Reply

Melly June 17, 2010 at 1:13 am

Nice idea, i will try to make 404 more informative, or maybe ill make a list of recent posts and popular posts in my 404 page
Melly´s last blog ..Group Health Insurance

Reply

Jack Luu July 11, 2010 at 1:06 pm

what a great tips, i will do it for my blog immediately. i think recent topic will be a good choice
Jack Luu´s last blog ..Sức sống từ một dòng kinh

Reply

Beachamp Web Design July 12, 2010 at 3:32 pm

Thanks for the post going to review all of my 404 pages now
Beachamp Web Design´s last blog ..Local Firm Directory Web Design

Reply

Vamban Blog July 17, 2010 at 3:32 pm

Hi alex

Here i found some cool 404 error pages
http://www.instantshift.com/2009/03/24/creative-404-error-pages-around-for-inspiration/

Seems good and creative collection though. :)

Reply

SQL Server Tutorial July 22, 2010 at 11:48 pm

very interesting and creative 404 page
SQL Server Tutorial´s last blog ..Single Transtact SQL Command

Reply

Patricia August 9, 2010 at 12:52 am

Wow. Now I can appreciate why 404 page so important. You have taught with clarity and great understanding. Will now go and sort something for my blog. Have signed up for the newsletter so look forward to more great information that will get me more confident with all the techie stuff I need to have a great blog. Thanks again for all the articles you make available. Feel I am learning heaps
Patricia Perth Australia

Reply

Yasser Khan August 16, 2010 at 11:50 pm

Hey Alex, nice post on 404. I’d personally like to see your own 404 page, have u developed it?
Yasser Khan´s last blog ..My Journey for Financial Literacy in Singapore

Reply

Leave a Comment

CommentLuv Enabled

10 trackbacks