How can I track 404 pages?

All modern websites use 404 pages to communicate that the page was not found. In most cases, it can’t be found because we deleted the page and forgot to redirect it, or we used a broken link on our website. Sometimes, a visitor might have typed a wrong page URL in the browser and this also resulted as a 404-error message.

If your 404 page is set up in a way that the page URL remains unchanged and the page title has an identical part, for example Page not found | Clear Bank, then you can use Piwik PRO to track 404 pages.

An example of a 404 page.

We can use two tools to find 404 pages, segments or custom reports. We’ll show you both of them.

Analytics (new) + segments

To find 404 pages on your website, follow these steps:

  1. Find the page title of your 404 page and look for the part that remains unchanged, for example Page not found or 404 not found.
  2. Go to Menu > Analytics (new).
  3. Create a new segment.
  4. Use the following condition to set up the segment: Page title contains Page not found (use the fragment of the page title from step 1).
  5. Apply the segment for reports.
  6. Navigate to Reports > Pages.
  7. In the Pages report, you’ll find all page URLs that displayed a 404-error message.
  8. Pages report for 404 pages.
  9. In the Entry pages report, you’ll find all page URLs with a 404-error message that were first in the session. Here you’ll find broken links that appeared in search results on Google or other search engines, links wrongly used on referral websites or apps, and page URLs incorrectly typed in the browser.
Entry pages report with 404 pages.

Once you learn which page URLs lead to non-existent pages, you should set redirects to existing pages on your website. The best practice is to redirect them to pages with content similar to the content that existed before.

Analytics (new) + Custom reports

If you’re using custom reports, you can build reports that will filter out 404 pages, and also help you spot broken links on your website.

To find 404 pages on your website, follow these steps:

  1. Find the page title of your 404 page and look for the part that remains unchanged, for example Page not found or 404 not found.
  2. Go to Menu > Analytics (new).
  3. Navigate to Custom reports.
  4. Create an explorer report with:
    • Nested dimensions: Page URL and Previous event URL. Previous event URL is the page on which the broken link may still exist.
    • Metric: Page views
    • Filter dimensions: Page title contains Page not found (use the fragment of the page title from step 1) and Entry page title doesn't contain Page not found (use the fragment of the page title from step 1). We intentionally are excluding page URLs that were first in the session because we’ll create a separate report containing them.
    Broken links on our website shown on custom report.
  5. In this report, you’ll find page URLs with a 404-error message that appeared during the session. When you click the page URL, you’ll see the previous event URL that belongs to a page that probably has a broken link.

To find 404 pages linked from outside of your website, follow these steps:

  1. Find the page title of your 404 page and look for the part that remains unchanged, for example Page not found or 404 not found.
  2. Go to Menu > Analytics (new).
  3. Navigate to Custom reports.
  4. Create an explorer report with:
    • Nested dimensions: Session entry URL, Source, and Referrer URL.
    • Metric: Page views
    • Filter dimensions: Session entry title contains Page not found (use the fragment of the page title from step 1).
    Broken links from referral websites and apps, and search engines.
  5. In this report, you’ll find all page URLs with a 404-error message that were first in the session. Here you’ll find broken links that appeared in search results on Google or other search engines, links wrongly used on referral websites or apps, and page URLs incorrectly typed in the browser.
  6. When you click the session entry URL, you’ll see the source, and when you click again, you’ll see the referrer URL. This last bit of information can help you find referral websites and apps with broken links.

Knowing all of that you can redirect non-existent pages to existing ones, and correct broken links wherever possible — be it on your website, or referral website and apps.

Was this article helpful?

Be the first to rate this article.

Technical Support

If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

We’re happy to help!