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.
Prevention
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.
Cure
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
Saviour
I need your help please.
Anytime I publish a post, this link https://websiteghana.com/wiki, and all other sub links become 404s. I would have to save permalinks before it comes back. After some time, I go and check again and it’s a 404.
I seriously don’t know what to do again now.
Mahesh Reddy
Nice post on 404-errors prevention and cure
My site was hacked, due to some free WP plugin, due to which i got manual action from Google. Hundreds of unrelated japanese page links were created on my website. The error is coming from my own domian. Now we have cleaned the infected site and removed the unwanted pages, applied for re-consideration request in webmaster tools and got approved, and manual action(penalty) was removed. Error pages do not exist at all, the japanese pages have been removed. Problem is still thousands of 404 errors pages are showing up in google webmaster tools, even after marking them as fixed and it keeps showing 404 errors.
How to remove these 404 errors, please help.
Sachin Sharma
Hi,
Thank you for this article. Helpful. I have an another question though. The number of 404 errors have increased on my site, http://www.recaptoday.com. When user google recaptoday.com, it shows them pages that are been deleted from the site which results in 404 err. Any suggestions?
illPod.com
Great article, it’s has been a great help. Like many i was under the illusion that 404s effected your search engine rankings, so was pleased to find out that is myth. THANKS!
Tom Ewer
No problem at all ๐
Andy
Hey Tom, thanks for the nice post, I was looking for an appropriate solution since my beginnings, but had to do many other testing and trying ( and error ) so I pushed it forward to the future to find it.
This post helped me save much time – and if I would have a wish for free it would be how to implement RSS the best way ;)) . thanks again, Andy