Broken links are bad for a website’s user experience and can hurt your SEO performance. But it’s almost impossible to avoid them completely. A page might get a broken link if you delete it, restructure your site, or change a URL. A person who clicks on a broken link will get a 404 error, which is a bad experience.
The good news is that you can use Google Analytics 4 (GA4) to find and fix these broken links. Here’s a simple, step-by-step guide on how to do it.
The Prerequisites
Before you get started, you need to have a few things in place:
- You need to have access to a GA4 account and the permission to create a custom report.
- Your 404 pages should have a distinct, recognizable title, like “Page not found.”
How to find broken inbound links
We are going to use Google Analytics 4’s custom reports to find out which links on your website result in a 404 error page.
Step 1: Create a Custom Report
- Go to the Reports section in GA4.
- Go to the Engagement section.
- Click on Pages and screens.
- Select the Page path and screen class primary dimension and change it to Page title and screen name.
Step 2: Add a Secondary Dimension
- Click the plus sign next to Page title and screen name.
- Add a secondary dimension: Landing Page + Query String.
Step 3: Filter for Your 404 Page
- In the search bar, type in the name of your 404 page. For example, “Not Found.”
- This will show you a full list of pages with broken links.
If you don’t see any broken links, it’s possible you don’t have any, but you should always double-check. You can use a tool like a broken link checker to be sure. A professional SEO platform like Clickrank can help you with this. The platform’s can scan your website for these issues and give you a prioritized list of tasks to fix them.
How to fix broken inbound links
Once you have a list of all the pages with broken links, you need to fix them. You have a few options:
- Ask the webmaster: You can ask the webmaster of the website that links to the erroneous page to update the link. This can be time-consuming, and there is no guarantee they will respond.
- Create a 301 redirect: This is a much easier and more effective way to fix a broken link. A 301 redirect takes a visitor to the correct URL. As a bonus, it tells search engines that the page has moved permanently, and it will attribute the SEO value of that link to the new page.
After you’ve set up those redirects, you should see a steady decrease of 404 errors in the report.