I don’t want to get too philosophical here, but the first step for everything in life is being found. Everything evolves from there. The same goes for your content – if people cannot find it, how can you ever expect to attract traffic?
There are of course many things you can do to increase visitors to your blog. But what about the people who hit your site but bounce straight off? If you attract 100 visitors a day, decreasing your bounce rate by one percentage point has essentially the same effect as attracting one new visitor.
You may be wondering what this has to do with 404 errors. The problem is, your garden variety 404 error page probably attracts the highest bounce rate of any page on your site. There are of course certain things you can do to reduce that bounce rate, and we will be discussing that in detail next week. However, prevention is the best cure. And if prevention isn’t possible, you need a solution.
A Myth Dispelled
404 errors should be as uncommon on your site as possible, but some people seem to believe that they have knock-on effects that can dramatically affect your traffic numbers. Most specifically, a theory seems to be floating around that 404 errors can lead to a drop in your site’s search engine rankings.
That simply isn’t true – you only have to read this post on the Official Google Webmaster Central Blog for proof. Although you should go to great lengths to make sure that your visitors aren’t hitting 404 error pages on your site, you do not need to fret about your search engine rankings being negatively affected.
When it comes to WordPress, there are three common preventable causes of 404 errors:
- A change in permalink structure
- A change in taxonomy (e.g. category or tag) “slug“
- Deleted pages, posts and taxonomies
Let’s get to work.
1. Permalink Structure
In WordPress, you can alter your permalink structure via the Permalinks screen found under Settings:
For the vast majority of blogs, the best permalink structure is Post Name. Date-based permalinks will decrease click through rates on older articles (people don’t want to read old news), and the default and numeric structures are terrible in terms of usability, and also negatively affect your onsite SEO.
If you are using any permalink structure other than Post Name, it is probably time to change. But you need to go about it in the right way, in order to prevent an onslaught of 404 errors. Joost de Valk has written a guide (and created a tool) to facilitate a clean transfer in permalink structure – check it out here.
2. A Change In Taxonomy
The problem with defining categories and tags is that it is generally done when you are first starting out with your blog. At some point in the future, you are likely to want to refine your taxonomies. Whilst re-naming them isn’t an issue, changing the slugs is. Whilst WordPress is clever enough to update dynamic links to the new slug, any static links (including links from external sources) will not change, which will of course lead to 404 errors.
If you absolutely need to change a taxonomy’s slug, make sure to set up a 301 redirect from the old URL to the new one. A 301 redirect is basically a way of telling browsers (and search engines) that the relevant page does still exist, but in a new location. There are plenty of WordPress plugins that can create 301 redirects for you, but Redirect is probably the best:
Setting up redirects with this plugin is extremely straightforward, but for full documentation relating to its capabilities, click here.
3. Deleted Pages, Posts And Taxonomies
This is perhaps the most obvious cause of 404 errors – simply deleting a page, post or taxonomy. What was once there, no longer is. As above, WordPress will remove dynamic links, but static links (including links from external sources) will remain in place.
The easiest way to get around this issue is quite simply to not delete anything. When it comes to web development, deleting content is bad practice. But if you have a post that you feel must go, don’t delete it – instead replace the content of the post with a short message explaining why it has disappeared.
If you get rid of a taxonomy, it may well be that a 404 error page is the most appropriate thing for a visitor to see. If you no longer provide content that corresponds with the taxonomy’s description, perhaps the visitor shouldn’t be on your site. If however you are consolidating categories or tags, you are probably best setting up redirects to the remaining related taxonomy.
Often, 404 errors are completely unavoidable. A site may misspell a link, or you may do so yourself. How do you deal with the inevitable?
In theory, the process is remarkably simple – you need to find the 404 errors, and fix them in an appropriate manner. Fortunately, this is a pretty straightforward process. First of all, you will need a Google Webmaster Tools account. Once you are logged in, click on Diagnostics, then Crawl Errors in the sidebar. You will see something like this:
For the purposes of this article, we are interested in the “Not found” errors. Below the graph you will find a complete list of any link to your domain known by Google that returns a 404 error. If Google indexes a random external web page that happens to link to your domain with an non-existent URL, it will show up here.
In order to fix a link, you must determine from where it has originated. Just click a link, then in the popup click on the “Linked from” tab. The following screen, as you would expect, will show you where the link’s source page:
If the link is on your site, you can attend to the offended page and fix it. If the link is external, you can either set up a 301 redirect or contact the webmaster of the site in question and ask that they change the link. I would argue that option one is far more efficient (and likely to result in a positive outcome). You can mark links as fixed once you are finished with them.
Keeping Your Site Clean
The above steps may sound like a chore, but it is much like keeping your house clean. It may not be much fun, but ultimately it doesn’t take that long, and it keeps things presentable. If you attend to 404 errors on a regular basis, then the job never gets too big, and you can rest assured in the knowledge that you are maximizing the potential for engagement from visitors to your site.
What are your experiences with 404 errors? Have you just checked for the first time to find an absolute nightmare scenario, or is your site squeaky clean? Let us know in the comments section!
Creative Commons photo courtesy of sanbeiji