Optimizing your 404 error page is very important for a better website usability, better user experience and to retain your visitors. Today I’ll write about how to optimize your 404 error page. If you are using Thesis WordPress theme, it’s pretty easy to do the same.
What is 404 error
404 error page informs visitors that the server cannot locate the file they are looking for. 404 error occurs when there is a broken internal link, or mistyped URL, or wrong back link or recently moved web page.
How to optimize 404 error page?
- Be creative. Write some attractive funny punchline or use unique image at the top of the page, rather than displaying dry ‘Error’ message.
- Give direction to your visitors what to do next. You can place a search box in a prominent place on that page. Put top 5 links of your most popular posts or link to latest articles. You can also capture the search term that the visitor used to land to your page and you can show some related posts in accordance to that keyword.
- You can place link to your homepage, FAQ page, contact, sitemap or list of categories there.
- You can change the type of text such as: “See, what others are doing here!” and then you can put those links. You can also place your site’s facebook or twitter widgets there to keep your users engaged.
- Use same template for 404 error page similar to your site’s main template. If you are using WordPress, the look and feel of 404 template is similar to your website’s other pages by default.
How to optimize 404 error page in Thesis WordPress theme
- If you have already Thesis theme installed, you now need to install a plugin – Thesis Open Hook.
- Go to WordPress admin dashboard.
- Click on ‘Appearance’
- Select ‘Thesis open hook’
- Jump to thesis_hook_404_title
- Write there ‘Uh Oh, We’ve Lost That Page!’
- Tick mark the check box ‘Remove Thesis default 404 title’
- Now jump to thesis_hook_404_content and place this code there -
<h2>We're Sorry...</h2>
We seem to have lost that page! Don't worry. You'll probably be able to find the information you need by using the menu at the top of this page or by following one of these links below:
<h2>Search</h2>
<form method="get" class="search_form" action="<?php echo bloginfo('url'); ?>">
<input class="text_input" type="text" value="To search, type and hit enter" name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" />
<input type="hidden" id="searchsubmit" value="Search" />
</form>
<h2>Quick Links</h2>
<ul id="recententries">
<li><a href="<?= bloginfo('url'); ?>" title="<?= bloginfo('name'); ?>"><?= bloginfo('name'); ?></a></li>
<? query_posts('orderby=date&order=DSC&showposts=7&offset=1');
while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<? endwhile; ?>
</ul>9. Now tick mark both the check boxes below ‘ Execute PHP on this hook’ and ‘ Remove Thesis default 404 content’
10. Finally click on the ‘Little Save Button’. You are now done with an optimized 404 error page. You can place any other custom image or text in between the code above.
If you have any other ideas on how to optimize 404 error page, feel free to comment below.
Related posts:



very usefull article, thank you
Thank you Gagan
Yes, user must customize their 404 error pages.
Raj Mehta´s last [type] ..Vodafone Zoozoo 2012 Calendar Wallpapers Free Download