Find broken links in Google Analytics

Broken inbound links are bad for your website's user experience and hurt your SEO performance. However, it's almost impossible to avoid that some links are broken after some time. You may delete pages, restructure your site or change your URLs. Other websites may still link to your old URLs, and you may not be aware of that.

This is problematic for internal links, but especially for links from other websites to yours. Those hard-earned backlinks now take your visitors to a broken page. 

Thankfully, there's an easy fix for that. While you cannot completely avoid broken links, Google Analytics custom reports can help you find and fix broken links.

In this guide, I’ll show you how you can create a custom report to find broken links. This trick has helped me find and fix many silly mistakes, so I’m sure it can do the same for you.

How to find broken inbound links?

We’re going to use Google Analytics’ custom reporting features to find out which links to our website result in a 404 page.

There are 2 prerequisites before we can use Google Analytics to fix links:

  • You need access to the Analytics account and permissions to create a custom report
  • Your 404 pages should have a distinct, recognizable title. Something like “Page not found” will do.

Got that sorted? Great, follow these steps and you’ll be fixing 404s in no time.

Use the report template

Google Analytics lets you quickly add custom reports by using templates. Here's the template for the 404 report. Click the link and select the view in which you want to create this report.

Get report configuration

Don't forget to change the title of the page to the title of your 404 page.

Set up the report manually

Set up the report yourself by completing the following steps:

  1. Go to Customisation and click on Custom Report. Click on the New custom report button Step 1: go to custom reports and create a new report
  2. Enter a title like Broken inbound links
  3. Select Explorer as the report type
  4. In the Metric Groups section, click Add Metric and search for Entrances.
  5. In the Dimension Drilldowns section, add:
    • Landing Page
    • Full Referrer
  6. In the Filters section, click on add filter and search for Page Title. Leave the first dropdown to Include, and the second dropdown to Exact
  7. Enter the title of your 404 page in the field. This needs to be the exact page title of your 404 error page. Step 2: set up your report
  8. Select the views to which you want to add this. Normally you would select All views here.
  9. Hit save, and you’re done.
The result: A Google Analytics report showing all broken inbound links

There it is: your inbound broken link report. Select a long time range, and you’ll see all the pages that get a lot of outbound traffic, and result in a 404.

Why am I not seeing anything?
If you're not seeing any broken links, verify that you’ve entered the exact page title in the filter field otherwise it won’t work.  

How to fix broken inbound links?

We have now found all pages that get linked to from other websites, but result in a 404 page. There are a few ways to fix that:

  • Ask the webmaster of the website that links to the erroneous page to update the link. It would be great if she could do that but it’s time-consuming and you don’t know if she’ll even respond. Luckily, there’s an easier way.
  • Create a 301 - permanently moved redirect. This takes your visitors to the correct URL. As a bonus, Google and other search engines will realize that the page has moved, and will attribute the SEO value of that link to the new page. And that’s exactly what we want!

After you’ve set up those redirects you should see a steady decrease of 404 entrances in the report. Keep reviewing the report on a regular basis to track your progress.

Pro-tip: have reports emailed to you

If you want to stay on top of broken inbound links, create a custom report. In the report view, click on Share, and enter your own email address. Select how often you want to receive this, for instance, select Weekly in the frequency field. Now, you’ll get a weekly overview of all broken inbound links in your mailbox. No broken link will go unnoticed!