Written by: Sanjeev

How to Find Internal Broken Links in GA4 and Fix the Source

Learn how to find internal broken links using Google Analytics. Trace 404s back to the page that links to them and fix the source, not just redirect it.

Elegant Themes

A reader clicks a link on your blog. Instead of the article they wanted, they land on a “page not found” screen. They didn’t do anything wrong โ€” you did. Somewhere on your own site, one of your posts is pointing at a URL that no longer exists.

That’s an internal broken link, and most blogs are quietly full of them. Deleted posts, renamed slugs, a typo in a manual link โ€” they pile up over years and you never notice.

Illustration showing how to find internal broken links between two web pages with a 404 error

Here’s the good news. If you already run Google Analytics, you’re sitting on the data you need to find them. Not just the dead pages, but the exact page on your site that’s pointing at each one. In this guide I’ll show you how to find internal broken links in GA4, trace them back to their source, and fix them properly.

What is an internal broken link?

An internal broken link is a link on your own website that points to a page on the same site which no longer exists, returning a 404 “not found” error. It differs from an external broken link, which points from your site to a dead page on someone else’s domain.

The important word is internal. You own both ends of the link โ€” the page doing the linking and the page it’s pointing at. That’s what makes these fixable in the best possible way. You don’t need anyone’s permission. You just edit your own content.


Why internal broken links quietly hurt your blog

Internal broken links waste the trust readers place in your site. Every dead link is a small promise you broke, and readers who hit two or three of them stop clicking altogether.

They also leak SEO value. Search engines follow internal links to discover and rank your pages, so a broken link is a dead end that passes no authority and can make your site look poorly maintained. For a blog that lives on organic traffic, that matters more than most people realise.

So this isn’t a cosmetic clean-up. Fixing internal broken links protects both the reader experience and the ranking signals you’ve spent years building.


Can Google Analytics find broken links?

Google Analytics can find broken links, but only the ones real visitors actually clicked. GA4 records a pageview every time someone lands on your 404 page, so those hits show up in your reports โ€” along with the page they came from.

That last part is the whole trick. GA4 stores a page referrer for most visits, which is the URL the user was on right before they hit the dead page. When that referrer is one of your own posts, you’ve found an internal broken link and the exact page that needs fixing.

One honest caveat before we start. GA4 is reactive โ€” it only knows about a broken link once a human has clicked it. Links that nobody has tried yet stay invisible. I’ll cover how to close that gap later, but for finding the broken links that are actively annoying real readers, GA is one of the fastest tools you have.


How to find internal broken links in GA4

GA4 Exploration report tracing a 404 URL back to the referring page that contains the broken link

The whole method rests on one thing: being able to tell GA which pageviews are 404s. Once you can do that, building the report takes a few minutes.

Step 1 โ€” Give your 404 page a distinct title

Open your site’s error page in a browser (visit any URL that doesn’t exist) and look at the browser tab. If the title is something generic like your site name, you have a problem โ€” you won’t be able to separate 404s from real pages in GA.

You want the 404 page’s title tag to contain a clear, unique marker. Something likeย “404 โ€“ Page Not Found”ย works perfectly. On WordPress, most good themes already do this; if yours doesn’t, your theme’sย 404.phpย template or an SEO plugin can set it. This one detail is what makes everything below possible.

Step 2 โ€” Build a 404 Exploration report

In GA4, go to Explore and open a blank Free-form exploration. Then set it up like this:

  • Dimensions โ€” add Page title, Page path + query string, and Page referrer.
  • Metric โ€” add Views.
  • Rows โ€” drag in Page path + query string (this is the dead URL people landed on).
  • Values โ€” drag in Views.
  • Filter โ€” set Page title to contains 404 (or whatever unique word your error page uses).

Apply it, and you’ll get a clean list of every broken URL your visitors have hit, ranked by how often. The ones at the top are the ones hurting you most.

Step 3 โ€” Add the Page referrer to see where the link came from

A list of dead URLs is useful. Knowing who’s pointing at them is the actual fix.

Drag Page referrer into the Rows box, underneath Page path + query string. Now each broken URL expands to show the pages people were on right before they hit it. That referrer is your suspect โ€” the page carrying the broken link.

Step 4 โ€” Separate internal from external

Scan the referrer column. If the referrer starts with your own domain, it’s an internal broken link โ€” a link on your site is at fault, and you can fix it today. If the referrer is Google, a social site, or another domain, that’s an external source pointing at a URL you probably deleted, which is a different job.

For this guide, filter your attention to referrers on your own domain. Those are the ones fully in your control.


How to fix internal broken links at the source

Fixing an internal broken link at its source instead of using a redirect

Here’s where I part ways with most advice on this topic. The common answer is “set up a 301 redirect.” That’s the right call in some cases, but it depends entirely on one thing: do you control where the link comes from?

For an internal broken link, you do. The link lives on your own page, so you can go straight to it. And there are really only two reasons an internal link is dead:

  • The URL was typed or pasted wrong. A slug typo, a missing letter, an old draft path. The correct page still exists โ€” you just linked to the wrong address. Fix the link and the reader lands exactly where you meant.
  • The target page was removed or renamed. In that case, point the link at the closest live page โ€” the replacement post, the parent category, or wherever the content moved. That sends readers somewhere useful instead of a dead end.

Either way, editing the source link is the clean fix. It sends the reader straight to the proper page with no extra hop, and it removes the wrong link from your post for good rather than forwarding around it forever.

So the workflow is simple:

  1. Take a referrer URL from your GA report and open that post in your editor.
  2. Find the link pointing at the dead URL โ€” a quick browser search (Ctrl/Cmd + F) for a word from the broken path usually finds it fast.
  3. Repoint it to the correct live page, or remove it if there’s genuinely no good replacement.
  4. Save, then move to the next referrer.

A shortcut when the same dead URL is linked from many posts.ย Editing a dozen posts by hand is tedious, so for that I lean on a search-and-replace plugin likeย Better Search Replaceย or Search Regex. It finds every instance of the old URL across your database and swaps in the correct one in a single pass. Two rules before you run it, though. Back up your database first โ€” these plugins write straight to it โ€” and use the dry-run or preview mode to see exactly what will change. It only works when every instance should point to theย sameย new URL, which is precisely the typo-fix and moved-page cases above.

Redirects earn their place with external links โ€” the ones you can’t control. When another site, an old bookmark, or a search result points at a URL you deleted, you can’t edit their link, so a 301 redirect on your end catches those visitors and forwards them to the right page. That’s the difference: fix the source when you own it, redirect when you don’t.


Where GA4 falls short (and what to pair it with)

Comparing GA4, Search Console and a site crawler for catching internal broken links

I promised honesty about GA’s blind spot, so here it is. Because GA4 only records 404s that someone actually clicked, it will never show you a broken link that no reader has stumbled onto yet. On top of that, the Page referrer dimension isn’t always populated โ€” direct visits and some privacy setups strip it โ€” so a few 404s will show up with no source attached.

That’s why I treat GA as one tool, not the whole toolkit. To catch everything, pair it with two others:

  • Google Search Consoleย โ€” its Pages report flags URLs Google itself found returning “Not found (404)” while crawling, including links no human has clicked. Google’s ownย Page indexing report documentationย explains how to read it.
  • A site crawler โ€” a tool like Screaming Frog or a WordPress broken-link plugin crawls every internal link on your site and reports the dead ones directly, whether or not anyone has visited them.

Here’s how the three compare for finding internal broken links:

ToolWhat it catchesShows the page doing the linking?Best for
GA4404s real visitors actually clickedYes โ€” via the Page referrerSpotting the dead links hurting readers right now
Search Console404s Google found while crawling, even unclicked onesOnly a limited, sampled hintGetting the fuller list of dead URLs
Site crawlerEvery internal link, dead or aliveYes โ€” exact source page for eachPrecise, site-wide internal link clean-ups

The takeaway: GA4 tells you which broken links are costing you readers today, Search Console widens the net to links nobody has clicked yet, and a crawler pinpoints the exact source page for every internal link. Use all three and nothing slips through.

One caveat on the WordPress side, though. Plenty of plugins will crawl your whole site on a schedule to hunt for broken links, and they do the job โ€” but that crawling is real load. On shared or modest hosting, a plugin repeatedly requesting every page can slow the site down for real readers, and in the worst cases push resource usage high enough to trip your host’s availability limits. That’s the quiet advantage of the GA4 method. The data rides along with normal page delivery โ€” your readers’ own visits generate it โ€” so you learn where the broken links are without adding a single extra request to your server.


How to stop internal broken links from coming back

Finding and fixing is reactive. The real win is not creating them in the first place.

Most internal broken links trace back to two habits: deleting or renaming posts without checking what links to them, and adding manual links in a hurry. A consistent internal linking process fixes both โ€” when you know which posts link where, you can update them the moment a slug changes. I wrote a full walkthrough of the system I use in my internal linking strategy for WordPress blogs, and it’s the single best defence against this problem.

Run the GA report every month or two. It takes ten minutes, and it keeps a slow, invisible problem from ever getting big.

FAQ about Internal Broken Links

How do I find internal broken links in Google Analytics?

Internal broken links show up in GA4 when you build an Exploration report filtered to your 404 page title. Add theย Page referrerย dimension to see where each dead-link click came from. When the referrer is your own domain, you’ve found an internal broken link and the exact page to fix.

Does Google Analytics track every broken link on my site?

Google Analytics tracks only the broken links that real visitors have clicked. It won’t show links nobody has hit yet, and some 404s appear without a referrer. Pair GA with Google Search Console and a crawler to catch the ones GA misses.

Should I fix internal broken links with a redirect or by editing the link?

Internal broken links are best fixed by editing the source link, since you own the page doing the linking. A 301 redirect leaves the wrong link in place and adds an extra hop. Save redirects for external links or dead URLs you can’t edit directly.

Why does my 404 page not show up in Google Analytics reports?

Your 404 page probably shares a generic title with the rest of your site, so GA can’t separate it out. Give the error page a distinct title tag such as “404 โ€“ Page Not Found,” and it will become filterable in your Exploration reports.

What’s the difference between an internal and external broken link?

An internal broken link points from one of your pages to another page on the same site that no longer exists. An external broken link points from your site to a dead page on someone else’s domain. Internal links are easier to fix because you control both ends.

Full Disclosure:ย This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). We only hyperlink the products which we feel adds value to our audience. Financial compensation does not play a role for those products.

Photo of author

About Sanjeev

Sanjeev is a technology enthusiast and full-time blogger who has spent more than 20 years building enterprise software and over a decade growing blogs from a blank page into thriving sites. Through MetaBlogue, he shares the practical side of building an online presence โ€” WordPress, SEO, social media, and the AI tools changing how we all create.

Envato Market

Subscribe to Exclusive Tips & Tricks

MetaBlogue

MetaBlogue is an online publication which covers WordPress Tips, Blog Management, & Blogging Tools or Services reviews.

>
Share via
Copy link