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.
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.
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.
Don't forget to change the title of the page to the title of your 404 page.
Set up the report yourself by completing the following steps:
- Go to Customisation and click on Custom Report. Click on the New custom report button
- Enter a title like Broken inbound links
- Select Explorer as the report type
- In the Metric Groups section, click Add Metric and search for Entrances.
- In the Dimension Drilldowns section, add:
- Landing Page
- Full Referrer
- 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
- Enter the title of your 404 page in the field. This needs to be the exact page title of your 404 error page.
- Select the views to which you want to add this. Normally you would select All views here.
- Hit save, and you’re done.
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.
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.
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!