404 Error Page: Features and Implantation
404 error pages are pages where people arrive after they have visited a link that doesn’t exist. Various reasons could have caused this: the pages could have been moved or deleted or it was just by accident. These people were interested in your site, but without a proper 404 error page, they might just move on.
Today we will talk about what features an error page should have and how we can implant the custom error page into our site or blog.
The Features of a Good 404 Error Page
The points that I will refer to have been working for me for a couple years.
- Descriptive title – The user should know they are on a 404 page, so don’t forget to tell them they are.
- Sitemap – If you have a sitemap, be sure to include a link to your sitemap on your error page. People might browse through the sitemap to find the page they were looking for.

- Mistyped URL – On an error page you could include the mistyped URL. This makes it easy for the visitor to scan the URL for typos or mistakes.
- Search box – A search box in the 404 page is a must. The possiblity exists that the information is still on the site and with a simple search, the user might find the information they need.
- Common links – Adding a couple links to some common pages (like the about/contact/articles pages) will increase the number of people that stay and want to read something on your site.
- Popular articles – Displaying a number of popular articles is good to push your best content forward. Visitors might get interested by these titles and click an article.
- Archives – It is also possible to add the list of archives to your error page. They might find the article they are looking for. If not, they might browse the archives to look for this article and then might stumble on some other interesting article.
Implant the 404 Error Page in Your Site
Now you know what features your error page has, it is time to implant it on your site or blog. I will discuss two ways to get your error page up and running. One way is an error page in WordPress and the other is via .htaccess.
404 Error Page in WordPress
WordPress has a build-in error message in their themes. This isn’t the best solution as it only give the user this explanation: Error 404 – Not Found .
Editing the error text
One thing you can do is editing that text in your WordPress theme. You should locate index.php and find the error message. You can add more and better text to your likings.
Creating an error page
You could also create a custom error page. This solution is in my opinion the best for WordPress. You should make a file called 404.php, add the custom text and messages, add it in your theme directory and your error page is ready to go.
404 Error Page via htaccess
If you don’t use a blogging tool like WordPress you need a proper looking 404 error page too.
The first step we will take is opening (or creating if you don’t already have one) the .htaccess file. We need to add a couple extra lines to this file to tell our server to redirect the visitor to a custom 404 page once they have need it.
You should add these codes to the .htaccess file:
1
ErrorDocument 404 /404.htmlThis tells the server your 404 document is located somewhere other than default. You now have the power to change the error page to your likings.
Other Error Pages
You could also use this trick to build custom error messages for other apache errors. Take a look here for the status codes Apache uses.






hey Stefan. Excellent and helpful posting. I might also suggest a tool that we’ve built called http://www.errorlytics.com that not only tracks and analyzes 404 errors, but also lets you fix them quickly and easily in a search engine friendly manner. Feel free to check it out and we’d love to have your feedback on it. It’s a little rough right now, but we’re adding refinements in all the time. Please let us know what you think. Hopefully it’s helpful…and the WordPress and Drupal plugins make install pretty easy too.
Best,
Josh Katinger
Really needing this, thanks for the tips. I’ll add yours with some others that I’ve found along the way.
I think it’s time.
Hey Stefan, thanks for the informative post regarding 404 pages. I think it is something very important to include when developing a blog, as like you said if someone finds a broken link they might just end up navigating completely away from your site.
@Josh – That service looks awesome! Thanks for pointing me to it!
@Tertius – No problem. Do you mind sharing those tips with me/us?
@SJL – Welcome to the blog. Thank you for the feedback and you are completely right about the navigating away-part. We want them to browse our blog, right?
Google has a useful 404 widget as well: http://tinyurl.com/6rbfmq
Disclaimer: I work for Google so I am obviously biased.
[...] Menu dropdown multinível em javascriptCustmomizando e implementando suas páginas de erro [...]
I automatically send visitors to my homepage when they hit a broken link. What do you think about this?
Well, I think it is alright. But a problem is that if the user is looking for a specific article, they will be redirected to the homepage and they are lost. What do you think?
[...] divitodesign.com Salva e condividi questo articolo: Queste icone linkano i siti di social bookmarking sui quali i [...]
Thanks so much for that tool Josh, it is REALLY helpful
For me our sites are not less than our personality representatives. I think all webmasters missed that part of web structure always but now it is as essential as other pages.
thanks for this i always wondered how to implement this without the use of wordpress
Some little things and errors always put us in awkward positions and I had similar one when was quoting my blog for some real time examples to my friends. I feel embarrassed when had not found page. I think everything should be handled very well including error pages.
Two things which really earned me trouble. 404 pages and permanent redirects. I have implemented that 301 redirect and my sites goes in an indefinite loop. I like to see how to of 404 page though.