404 Error Pages: Best Practices
Est. Reading Time: 2 minutes
Ya know what grinds my gears?! When I click a link (internal or external) and I get one of these:
You know what I do? Leave.
And so do 99.9999% of everyone else that hits an error like this. So how do you avoid this? Add a custom 404 page using these best practices:
- Your 404 page should actually return a 404 HTTP Status Code. This may seem obvious, but I’ve seen plenty of 404 pages out there throwing 200. From a user perspective, this is fine. But search engines should be notified of the broken/dead page via a 404 status code. When your error page returns a 200, search engines can misunderstand this and index pages that no longer exist. This is particularly important for anyone concerned with SEO!
- Your 404 Page should look like any other interior page on your site. Include the usual header, navigation, and footer.
- Acknowledge the error and include a message notifying users that the page they’re trying to access no longer exists. Something like “Oops, the page you’re trying to access no longer exists” should suffice. As a bonus, you could try one of the following tactics:
- Relevant imagery. Here’s one of my favorites from LEGO.
- Suggest other sections of your site that might be of interest. TED does a great job with this.
- Be funny about it like Trek Bicycles. Laugh at yourself, your visitors will appreciate it.
- Include a ‘Search’ bar like MailChimp.
*notice in all examples above, they’re all returning 404 status codes.
No site is perfect, error pages will be hit. It’s a fact of life that we must deal with. So we may as well deal with it the best possible way right? If you’re still using a generic 404 page, you’re losing people. No one is going to go to their URL bar and remove everything after the .com to get back to your homepage. They’re going to leave your site and go check out the competition. If you’re showing a custom 404 page, you’re highly likely to retain visitors. Especially if you implement one (or more) of the suggestions above.
It’s 2016, I think it’s high-time we retire the generic 404 page. I hope this post has convinced you to add a custom 404 to your site.