404 errors can be the bane of our lives, especially if we have big sites with content changing rapidly. The worst part is, website owners can often be oblivious to the issues users face on their site as a result. Even if every link on your site is correct, you could have streams of traffic coming from referrers landing on your 404 page and not even know it!
For this reason, it’s vital you have at least a functional 404 page with links to your main site sections! (topic for a future post). You should have a quick look at your 404 page right now (just add a few characters to a real URL) and see what links you have on there for the hapless user.
This post is about how you can find out how many 404 errors you’re getting, and how to go about trying to fix them.
Tracking down what’s causing the 404 errors
As with many things in analytics, tracking down 404, or (‘page not found’) errors starts with robust implementation!
At my company we have bespoke code on the 404 page that generates a unique identifier, so a typical URL for a 404 page would be: ‘/err.aspx?errorpath=index.aspx’ where ‘index’ was the page on my site the link was looking for.
Luckily, google have code that will do something very similar on your site! You can pick this up from their help section here if you haven’t already installed this kind of tracking.
Once you’ve established the above, you should go to your content section in Google Analytics and run a top content report, filtering for the unique identifier for your 404 pages.
In my case this would be ‘^/err.aspx’, if you use the google one it would be ‘^/404.html’
You should now be looking at a list of your error pages, and the first question you should ask yourself is whether you have an issue or not. Typically you will see at least a few 404 errors, are you concerned about the amount of traffic that is coming through on any particular error? If there are just a couple over say a month, could they be typos or random issues?
If you do have an error that is of concern, click on it to explore further. Once in ‘Content Detail’, click on ‘Navigation Summary’ which shows you where people clicked from to find the page.
At this point you can identify if the problem is on the site, or a link elsewhere with an affiliate or a referer. If you have a high % of ‘entrances’ it’s most likely an offsite link. Be wary of red herrings in this report too, I typically see a high instance of referrals from my ‘index’ page to my error page. I know I don’t have any broken links on that page, but I do have a link to my ‘index’ page on my error page. Why would someone click ‘back’ to a 404 page having just escaped? Maybe our 404 page is too good! I don’t know, but be aware of this before you go nuts trying to find broken links that don’t exist!
404 errors from broken links on your site
If the referring pages are on your site: Your job is nearly done, check out the pages in the navigation summary report and fix the broken links!
404 errors from other sites or search engines (or ‘I wondered why that campaign was so underperforming’)
If you are getting a high rate of issues coming from offsite, you need to go back to the content detail view for the page and run the entrance sources report. With some filtering in this report, you should be able to track down what medium, source, campaign, referer is responsible for the errors.
At this point you have all the facts you need to make your decision, you can do a number of things:
1, reinstate the missing page you deleted that is still clearly driving traffic to your site.
2, 303 redirect the users to an appropriate live page on your site.
3, contact the referer/change the google ad/otherwise get that link changed!
Whatever course of action you choose, you now know if you have a problem, how big the problem is and how to go about fixing it. Typically I run this report at least every few months just in case of any issues. I also have a great 404 page, which although generic by design, is still more like landing on a homepage than seeing the internet crumble before your eyes!
Please let me know if you’ve used a similar technique, or maybe you know a better technique for tracking down errors? Did you get any results following the above? Did you find it vaguely interesting? Let me know!