Your website can display 404 errors for two reasons:
Reason #1 (in your control) – If you change the URL of an existing page or decide to delete it completely from your server, your visitor will get a 404 or “File Not Found” error when they try to access that page.
Reason #2 (not in your control) – Say your page URL is abc.com/xyz and another site decided to link to that page but they mistakenly used a wrong URL (say abc.com/xyy) – if people visit your page through the other site, they’ll see a 404.
Track all the Missing Pages on your Site
It is extremely important that you get your 404 errors fixed as soon as you spot them because they not only spoil the visitor experience but your site may also lose Google juice. Google gives you points for every incoming link but the benefit is lost if that link is pointing to a non-existent page.
Let me now share the various tools that I use to track 404 error pages on my site.
If you are using Google Analytics, you can slightly tweak the JS code to also enable tracking of missing pages through the same code. The modified code will generate a virtual pageview in your Analytics reports (see the above screenshot) that will not provide you with the URL of the missing page but also the URL of the referring site.
The only issue with the Google Analytics approach is that it can artificially inflate the pageviews of your site though by a very small number.
My next favorite service is LinkPatch – they have a free version that works with any one domain. LinkPatch is purely for tracking 404 errors – you just to have add a line of code to your 404 template* and it will send you instant emails as soon as it discovers any 404 page on your site.
What you’ll like most about LinkPatch is the ease of use (Google Analytics is obviously complex for most users) and that the notifications for missing pages are delivered in real-time so you don’t have lose any traffic.
In that case, I recommend using the very-awesome Google Webmaster tools. Once you have added and verified your site with the Google Webmaster panel, go to Dashboard – > Diagnostics – > Crawl Errors and select the “Not found” option.
Here you’ll see a list of all pages that returned a 404 status code to Google while it was trying to index your site. The tool may not catch every single missing page of your site but, as Matt Cutts remarked, “the vast majority of the backlinks you’d care about, at least as far as Google is concerned.”[*] WordPress users can add the tracking code to either their 404.php file or anywhere in the template through the function is_404().