Are You Losing Readers From Your 404 Page?
No matter how much time and tedious effort we put into making sure all of our links work, and go where they are suppose to, we can't always control incoming links. Maybe a search engine is still indexing a page you deleted or renamed long ago, or someone is errantly linking to one of your articles. Regardless of how it happens, dead or errant links come with the territory.
When a user clicks on a dead or errant link one of two things usually happens. Either they get the default browser 404 Error Page or they may get a generic 404 Error Page that says something like:
Error 404 - Not Found
Neither of these options are optimal as they will likely result in the user quickly leaving to find the information they need elsewhere. You just lost a user who could potentially be a loyal reader and income generator.
No need to worry though, by creating a custom, more helpful, 404 Error Page you can encourage readers to look further than the standard error page. And in the process you may be able to convert them into a loyal reader. Here is a quick guide on how to edit or create your own custom 404 Error Page in WordPress.
Find Your 404 Error Page
If you are using one of the many standard WordPress themes, you will likely already have an existing 404 Error Page of some kind. However, this is not always the case. Here is how to check to see if you have an existing 404 Error Page with your template.
Login to your WordPress Admin and navigate to "Presentation" > "Theme Editor". On the right had side you will see a list of all of the page associated with your theme (Stylesheet, Header, Footer, Main Index, etc.). If you have an existing 404 Error Page it will probably be listed as 404 Template, 404 Error, 404.php, or similiar. If you do not have any of these files do not worry, I will go over how to create your own 404 Error Page in the next section.
Create A 404 Error Page
If your theme currently does not have a 404 Error Page, one can be easily created by following these steps.
1. Create a blank file and name it 404.php
2. In your Theme Editor section of your WordPress Admin (WordPress Admin > Presentation > Theme Editor) click on your "Main Index Template" file.
3. Copy the contents of your "Main Index Template" file to your new 404.php file
4. Remove "The Loop" and any other unnecessary code. Your "Loop" should look something like this.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<p><?php the_content(''); ?></p>
<?php comments_template(); ?>
<?php endwhile; ?>
Once you have removed "The Loop" and all other non essential code you should be left with something like this. (Note: This is a simplified version but will give you an idea)
<?php get_header(); ?>
<div id="content">
This is where your "Loop" content was</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
5. Add some sort of test message (ie. This is a sample 404 page) where your "Loop" used to be.
6. Save this 404.php file and upload to your theme directory.
7. Verify your new 404 Error Page is working by trying to access a page on your site that doesn't exist (www.yourdomain.com/AverageJoeBloggerIsTheCoolest/ ).
You now have a blank 404 Error Page that you can customize and that will match the rest of your theme.
Edit Your 404 Error Page
Whether you already had an existing 404 Error Page or just created one using the steps above, it's now time to make changes and customize the error page to include more helpful information that will encourage readers to hang around your site for a bit longer.
If your not still logged into your WordPress Admin, then re-login and navigate to: WordPress Admin > Presentation > Theme Editor > 404 Template
Your file should look something like what I have here.
<?php get_header(); ?>
<div id="content">
Custom 404 Message Goes Here</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Now just have a bit of fun with it and use your creativity. At the very least you should write a custom message with some helpful information on how else your lost reader might be able to find what they are looking for.
No comments:
Post a Comment