Monitor & Fix 404 Errors with Google Analytics 4

Learn how to track, find, and fix broken links on your website using GA4 Explorations and Google Tag Manager — step by step.

Note: This guide was first published in 2018 by Eoghan Henn. It has been updated by Michael Weber in January 2026.

The guide shows you how to monitor 404 errors on your website using Google Analytics 4 (GA4). If your 404 error page is set up correctly and tracked by GA4, you can create powerful reports to identify broken links — both from internal navigation and external referrers.

GA4 vs Universal Analytics

This guide has been fully updated for Google Analytics 4. The old Universal Analytics (UA) was sunset in July 2023. If you’re following an older guide that mentions “Custom Reports” or “Views,” you’ll need the GA4 equivalents we cover here.

Universal Analytics

Custom Reports

Google Analytics 4

Explorations

 

How to Set Up Your 404 Page Correctly

Before you can track 404 errors effectively, you’ll need to make sure your 404 page is configured properly — both for SEO and analytics purposes:

  • Keep the URL intact: The 404 page should load on the exact URL that was requested (e.g., /non-existent-page), NOT redirect to a dedicated URL like /404/ or /error/.
  • Return a proper 404 HTTP status code: The server must return a 404 status code, not a 200 OK or 301/302 redirect.
  • Include the GA4 tracking code: Your 404 page template must have the Google Analytics tracking snippet installed.
  • Use an identifiable page title: The <title> tag should contain “404”, “Page Not Found”, or another unique identifier you can filter on.
Common Mistake

Many websites redirect 404 errors to a page like /404.html or /error/. This prevents you from seeing which actual URLs triggered the error. Always serve the 404 page on the original requested URL!

 

Method 1: Track 404s Using Page Title (Recommended)

The simplest and most reliable way to track 404 errors in GA4 is by filtering for the page title. If your 404 page has a title like “Page Not Found – YourSite” or “404 Error”, you can filter your reports to show only those pages.

Requirements

  • GA4 tracking code must be on your 404 page
  • Your 404 page title must contain a unique identifier (e.g., “404” or “not found”)

This method works out of the box with standard GA4 page_view events. Jump to the Exploration setup section to learn how to build the reports.

 

Method 2: Track 404s Using Custom Events (Alternative)

If your 404 page doesn’t have a unique page title that you can filter on — or if you can’t change the title tag — you can send a custom event whenever a 404 page loads instead. This approach requires a bit more setup but gives you flexibility.

Option A: Using Google Tag Manager

If you use GTM, you can fire a custom event when the 404 page loads:

  1. Create a Trigger

    Go to Triggers → New and create a trigger that identifies your 404 page. You have two options:

    • Option A — DataLayer variable: If your CMS pushes 404 status to the dataLayer (e.g., pageType: '404'), create a Custom Event or Page View trigger that matches this variable.
    • Option B — DOM element matching: Create a DOM Element variable that captures specific text only visible on your 404 page (like “Page not found” or “This page doesn’t exist”), then use this as a trigger condition.
  2. Create a GA4 Event Tag

    Go to Tags → New → GA4 Event. Configure it with the event name page_not_found (or 404_error).

  3. Add Event Parameters

    Include helpful parameters like page_location, page_referrer, and page_title to capture context about the error.

GTM Tag Configuration

SettingValue
Tag TypeGoogle Analytics: GA4 Event
Configuration TagYour GA4 Configuration Tag
Event Namepage_not_found
Event Parameterspage_location: {{Page URL}}
page_referrer: {{Referrer}}
requested_path: {{Page Path}}

Option B: Direct gtag.js Implementation

If you’re not using GTM, add this code directly to your 404 page template:

// Add this to your site's main script or GTM Custom HTML tag
// Option 1: Check for a specific element that only exists on 404 pages
if (document.querySelector('.error-404') || 
    document.body.classList.contains('page-404')) {
  gtag('event', 'page_not_found', {
    'page_location': window.location.href,
    'page_referrer': document.referrer
  });
}

// Option 2: Check for specific text content on the page
if (document.body.innerText.includes('Page not found')) {
  gtag('event', 'page_not_found', {
    'page_location': window.location.href,
    'page_referrer': document.referrer
  });
}

// Option 3: Check dataLayer (if your CMS sets it)
if (window.dataLayer && window.dataLayer.some(function(obj) { 
    return obj.pageType === '404'; 
})) {
  gtag('event', 'page_not_found', {
    'page_location': window.location.href,
    'page_referrer': document.referrer
  });
}

Choose the option that matches how your 404 page is structured. You’ll need to adjust the selector, class name, or text to match your specific setup.

Register Custom Dimensions

If you want to use custom parameters like requested_path in your reports, you’ll need to register them as custom dimensions in GA4: Go to Admin → Custom definitions → Create custom dimension.

 

Create an Exploration for Internal 404 Errors

This report helps you find 404 errors caused by internal links — links within your own website that point to non-existent pages. These are entirely within your control and should be fixed promptly.

If you use Method 1 (Page Title)

  1. Open Explorations

    In GA4, go to Explore (left sidebar) and click Blank to create a new exploration.

  2. Add Dimensions

    Click the + next to Dimensions and add:

    • Page path and screen class (the 404 URL)
    • Page referrer (the page that linked to it)
    • Page title (to confirm it’s a 404 page)
  3. Add Metrics

    Click the + next to Metrics and add:

    • Sessions or Views
  4. Configure the Report

    Drag your dimensions to Rows and metrics to Values.

  5. Add Filters

    Add two filters:

    • Page title contains 404 (or “not found”)
    • Page referrer contains your domain (e.g., yourdomain.com) — this ensures you only see internal referrers

If you use Method 2 (Custom Event)

  1. Open Explorations

    In GA4, go to Explore (left sidebar) and click Blank to create a new exploration.

  2. Add Dimensions

    Click the + next to Dimensions and add:

    • Event name
    • Page location (the 404 URL)
    • Page referrer (the page that linked to it)
  3. Add Metrics

    Click the + next to Metrics and add:

    • Event count
  4. Configure the Report

    Drag your dimensions to Rows and metrics to Values.

  5. Add Filters

    Add two filters:

    • Event name exactly matches page_not_found
    • Page referrer contains your domain (e.g., yourdomain.com) — this ensures you only see internal referrers
Exploration SettingMethod 1 (Page Title)Method 2 (Custom Event)
TechniqueFree formFree form
RowsPage path, Page referrer, Page titlePage location, Page referrer
ValuesSessionsEvent count
FiltersPage title contains “404”
Page referrer contains “yourdomain.com”
Event name equals “page_not_found”
Page referrer contains “yourdomain.com”

Reading the Report

  • Page path / Page location: The URL that returned a 404 error
  • Page referrer: The page on your site that contains the broken link
  • Sessions / Event count: How many times this error occurred
 

Create an Exploration for External 404 Errors

This report shows 404 errors caused by external links — links from other websites pointing to pages that don’t exist on your site. You can’t directly fix these links, but you should set up redirects to capture this traffic.

If you use Method 1 (Page Title)

  1. Create a New Exploration

    Go to Explore → Blank to start fresh.

  2. Add Dimensions

    Add the same dimensions as before:

    • Page path and screen class
    • Page referrer
    • Page title
    • Session source / medium (optional, for more context)
  3. Add Metrics

    Add Sessions or Views.

  4. Configure Filters

    Add these filters:

    • Page title contains 404
    • Page referrer does NOT contain your domain — this ensures you only see external referrers

If you use Method 2 (Custom Event)

  1. Create a New Exploration

    Go to Explore → Blank to start fresh.

  2. Add Dimensions

    Add the following dimensions:

    • Event name
    • Page location
    • Page referrer
    • Session source / medium (optional, for more context)
  3. Add Metrics

    Add Event count.

  4. Configure Filters

    Add these filters:

    • Event name exactly matches page_not_found
    • Page referrer does NOT contain your domain — this ensures you only see external referrers
Exploration SettingMethod 1 (Page Title)Method 2 (Custom Event)
TechniqueFree formFree form
RowsPage path, Page referrer, Page titlePage location, Page referrer
ValuesSessionsEvent count
FiltersPage title contains “404”
Page referrer does not contain “yourdomain.com”
Event name equals “page_not_found”
Page referrer does not contain “yourdomain.com”
A Note About Referrers

Not all referrers are passed correctly. Many will show as “(direct)” or just the domain name without the full URL path. Search engines like Google typically only pass the domain. Focus on referrers that show actual page URLs — these are the ones you might be able to contact for a link update.

 

How to Fix 404 Errors

For Internal Link Errors

  1. Set up a 301 redirect from the broken URL to the correct page. This immediately fixes the user experience.
  2. Find and fix the broken link on the referring page. Use the “Page referrer” column to identify which page has the broken link, then update the HTML to point to the correct URL.
  3. Don’t leave 301s as a permanent solution — internal links pointing to redirects waste crawl budget and add latency. Always update the actual links.

For External Link Errors

  1. Set up a 301 redirect from the broken URL to the most relevant existing page. This captures the traffic and link equity.
  2. Consider contacting the linking site if it’s a high-value link from an identifiable source. Politely ask them to update the link.
  3. Check Google Search Console for additional 404 errors that may not appear in GA4 (since GA4 only tracks errors that users actually encounter).
Pro Tip: Find all your broken links automatically

With searchVIU, you can continuously monitor your website and get alerted when new important 404 errors appear — including daily redirect recommendations to fix them. Plus, you’ll discover other SEO problems like broken links, redirect chains, and more before they impact your rankings.


Get Started with searchVIU

 

 

Quick Reference: GA4 Dimensions for 404 Tracking

What You NeedGA4 DimensionMethod
The 404 URLPage path and screen classMethod 1
The 404 URL (full)Page locationMethod 2
Where the user came fromPage referrerBoth
Page title (to filter 404s)Page titleMethod 1
Event name (to filter 404s)Event nameMethod 2
Traffic sourceSession source / mediumBoth
Hostname (for multi-domain)HostnameBoth
 

Summary

Tracking 404 errors in GA4 requires using Explorations instead of the old Universal Analytics Custom Reports. Here’s what you need to do:

  1. Ensure your 404 page is properly configured (correct HTTP status, GA4 tracking installed, identifiable page title)
  2. Use the page title method to filter 404s — or send a custom page_not_found event if your page title doesn’t work
  3. Create separate Explorations for internal vs. external 404 errors using filters on the Page referrer dimension
  4. Fix errors by setting up 301 redirects AND updating broken links at the source

Monitoring and fixing 404 errors improves user experience, preserves link equity, and helps search engines crawl your site more efficiently. If you have any questions, feel free to reach out — we’re always happy to help!

Summary of 96 Comments (before the 2026 update)

Top Insights from the Discussion

1. 404 Error Tracking: A Big Need
  • Many readers thanked the author for demystifying how to track 404 errors using Google Analytics custom reports. Several commented on the lack of default reporting for 404s in GA—“Still amazes me that this isn’t a default report in GA?”
  • A recurring issue was people missing out on data because their 404 pages didn’t have GA tracking installed:

    “Your 404 page does not contain the Google Analytics tracking code, so it is not being tracked in GA currently.”

2. Dealing with 404 Errors: Redirects, Removals, and Indexing
  • The importance of proper 301 redirects came up repeatedly, especially after site migrations or URL changes:

    “You should set up 301 redirects from your old URLs to their new equivalents as soon as possible.”

  • Readers were relieved to hear that 404 errors don’t directly hurt rankings but were encouraged to clean them up for a better user and crawler experience.
  • Several readers faced persistent 404s from old or external links. The author advised a mix of redirecting, using removal tools, or investigating plugin issues (e.g., AddThis generating bad URLs).

3. Internal vs. External Broken Links
  • Internal links hitting 404s require attention—often the best fix is to crawl the entire site (using tools like Screaming Frog), then manually repair or redirect as needed.
  • External links leading to 404s will only show up in GA if someone actually lands on the error page—prompting some confusion when Search Console and GA data didn’t match.

4. Customization and Advanced Tracking
  • Tracking were often customized using Google Tag Manager for things like:
    • Monitoring which suggestion links are clicked on 404 pages (tracked as GA events).
    • Sending custom elements/content to GA when there wasn’t a clear page title.
    • Filtering for specific repeated text to identify 404 pages.

5. Interpreting and Troubleshooting GA Reports
  • Frequent confusion arose around missing data or dimensions. Many questions were solved with quick checks—like making sure the 404 page had the right tracking code, or adjusting filters (“page title” or similar).
  • Users moving between Blogger and WordPress, or using plugins, often created lots of broken links and needed advice tailored to their platform (plugins for redirects, editing templates for tracking code, etc.).
  • Some users discovered that what looked like mysterious 404s were actually caused by bots, spam, or misconfigurations.

Most Common (and Interesting!) Questions

  • How do I handle 404s after a site migration?

    “You should set up 301 redirects from your old URLs to their new equivalents… Even if it’s been a long time since migration, you can still set up these redirects.”

  • Why doesn’t my 404 report show any data?

    “Your 404 page does not contain the Google Analytics tracking code… And even then, the report will only show URLs that have been accessed by users, so they won’t mirror what you see in the crawl error reports in GSC.”

  • How can I find out which links on my 404 page get clicked?

    “Use Google Tag Manager to track the clicks on those links as events in Google Analytics. If you need any help with this, just let me know.”

  • Is it possible to track broken outbound (external) links with GTM?

    “I cannot think of a way to track broken outbound links with GTM that really makes sense, as this would involve requesting the link target and checking its status code… It would make more sense to set up a scheduled crawl for your outbound links.”

  • Why do valid URLs sometimes show up in 404 reports?

    “Sometimes URLs might give back a 404 error temporarily and then start working again… If you send more details, I can look into it.”

  • How can I force Google to drop a lingering 404 from its index?

    “Go to Crawl > Fetch as Google… and request indexing for the old URL after it’s redirected. This will speed up removal from the index.”

Recurring Themes

  • Redirects are your friend: When in doubt, redirect carefully—especially after migrations.
  • Crawl and audit regularly: Don’t just rely on user-reported errors; use crawling tools and Search Console alongside GA.
  • Setup matters: Custom reports in GA only work if your tracking and filters match your site’s real-world setup.

96 Responses

    1. Hi Harris! I’m sorry, you’re right. I added a note above the instructions so that this doesn’t happen to anyone else 🙂

  1. Hi Harris,

    Great article! I notice the 404 errors reported are in root-relative rather than absolute. How do I get the report to show the absolute URLs?

    Thanks you,
    Joe

    1. Hi Joe,

      The reports in GSC only show URL paths, but when you download them, you get the full URLs.

      I hope this helps!

  2. Hi, Eoghn Henn
    I have crawl error on webmaster. When I opened it”s not my page. Ex : myblog/2017/01/content-wrapper
    I removed it, with remove url from webmaster. After few month the error page was comming again on report.
    So I make redirect option from blogger dashboard to another page I haved.
    my question is, do I need remove again that issue or ignore that, because I already redirect to another page.
    sorry if my language not good.

    1. Hi Berbagi,

      Thank you very much for your comment. Please don’t worry about your language. I understood everything you wrote perfectly well.

      You did the right thing redirecting the URL. You can now mark it as fixed in your error reports and it should not show up again. There is no need to remove the URL via the “remove URL” feature if there is a redirect in place. One thing that you can do to speed up the process of removing the URL from the index is the following: Go to Crawl > Fetch as Google (in Google Search Console) and fetch the old URL (myblog/2017/01/content-wrapper, in your example). The status should show as “Redirected” and you can click on “Request indexing” next to it (see screenshot).

      Fetch URl with Google Search Console, status redirected, request indexing

      By doing this, tho old URL should disappear form the index very quickly.

      I hope this helps! Please let me know if you have any further questions.

  3. Hello Eoghan,

    Thanks for this information. However, in my case it seems different, search console shows 404 error on page that i do not know exited. Like the URL’s below. It gives me headache.

    https://www.sample.com/%E5%A4%A7%E5%A5%96%E8%80%81%E8%99%8E%E6%9C%BA%E4%BF%A1%E8%AA%89%E5%A5%BD%E4%B8%8D%E5%A5%BD+Q82019309.com.com

    %E5%A4%A7%E5%A5%96%E8%80%81%E8%99%8E%E6%9C%BA%E6%89%8B%E6%9C%BA%E7%89%88+Q82019309.com.com/

    %E5%A4%A7%E5%A5%96%E5%A8%B1%E4%B9%90%E6%80%8E%E4%B9%88%E6%B3%A8%E5%86%8C+Q82019309.com.com/

    %E5%A4%A7%E5%A5%96%E5%A8%B1%E4%B9%90TTG%E8%80%81%E8%99%8E%E6%9C%BA%E6%B3%A8%E5%86%8C+Q82019309.com.com/

    404

    %E5%A4%A7%E5%A5%96%E6%8D%95%E9%B1%BC%E5%BC%80%E6%88%B7%E9%80%81%E9%92%B1+Q82019309.com.com/

    404

    %E5%A4%A7%E5%A5%96%E5%A8%B1%E4%B9%90%E5%AE%98%E7%BD%91%E7%99%BB%E5%BD%95%E5%85%A5%E5%8F%A3+Q82019309.com.com/

    404

    %E5%A4%A7%E5%A5%96%E6%B3%A8%E5%86%8C%E5%B0%B1%E9%80%81%E9%92%B1+Q82019309.com.com/

    404

    %E5%A4%A7%E5%A5%96%E6%8D%95%E9%B1%BC%E8%B5%8C%E5%8D%9A%E7%BD%91%E7%AB%99+Q82019309.com.com/

    404

    1. Hi Irvin,

      These look like percent encoded Chinese URLs. If you let me know what website it is, I can have a closer look. Often, but not always, there’s a simple explanation for why Google’s bot discovers certain URLs.

    2. Need solution for the same too, GWT showing around 1K results with such queries. What solution do you recommend?

  4. The is exactly what I was looking for. There is so much in Google Analytics, that you need to know how to choose right elements to get the information you seek.

    Thanks a lot Eoghan Henn

    ps. wondering if I can use Custom Reports for Server Response time and Page Load Times (although I get the figures as in Site Behaviour, but something more detailed to track and fix)

    1. Hi Anup,

      I’m glad you found this useful.

      Sure, you can create custom reports with almost all metrics and dimensions that are available in Google Analytics. I recommend you play around with it a bit, in order to find something that fits your needs. What I really like about the “Flat Table” option ist that you can combine up to five dimensions! This gives us a lot of room for interesting reports.

  5. Hello Eoghan,

    We just made some changes to our site structure and your article has been very helpful.

    One issue I seem to be having is the external link report. I have found known external links that are broken on sites but can ‘t seem to get anything to show up in the report.
    I imported your reports and the internal report works great but it seems I may need a different configuration to get the external report to work.
    Any thoughts?

    Thanks
    Michael

    1. Hi Michael,

      I’m happy to hear that my article has been helpful. Errors from external links will only show up in Google Analytics if users actually click on the links and land on your error page. Maybe the links you are referring to haven’t generated any traffic? You can test this by clicking on the links yourself and making sure that you’re actually being tracked (and not filtered out of the view because of an internal traffic filter) by checking the real-time report. Your own visits should then show up in the external link report after a couple of hours.

      If this doesn’t work, please let me know via e-mail, so we can have a look at it together to see what needs to be fixed.

  6. Hi Eoghan,
    great text, I have problem with client who have too much broken link. How fast fix this problem. He has 4000 page on site. I found 8 broken link on one page.
    Thx in advance

    1. Hi Sasa,

      I would recommend crawling the entire website with a tool like Screaming frog and exporting all links to URLs that return errors. As a quick fix, you can set up 301 redirects from the error URLs to equivalent working URLs, but this should only be a temporary solution. It is not desirable to keep internal links to redirect very long. In the next step, there’s really no way around checking all of the faulty links you’ve exported and fixing them step by step.

      I hope this helps! Please let me know if you have any further questions.

  7. Thank you, have tested this code out and works great. Was thinking there maybe a better wy using GA’s AutoTrack Plugins however, your method gives good results.

    1. Hi David. I’m glad this worked out for you. And yes, there are probably lots of other (and better) ways to do this.

  8. I read on Google official blog that 404 errors — or even too many such pages won’t hurt our blog and its pages on Google result pages.

    But now I am having about 500 pages labelled 404 not found to which is hurt for my new post to get ranked.

    The reasons for this issue after migrating from Blogspot to WordPress, many of the post’s permalink from Blogspot changed when it’s converted to WordPress’s permalink.

    1. Hi Aldo,

      You’re right, 404 errors normally don’t hurt your rankings directly, but they’re still something you should avoid and take care fo for several reasons (see article and other comments).

      If your URLs change due to a system migration, you should set up 301 redirects from your old URLs to their new equivalents. Even if it’s been a long time since the migration, you can still set up these redirects.

      I hope this helps! Please let me know if you have any further questions.

  9. Hello Sir
    I face crawl errors because last month I changed the name 3 urls and 1 url removed.
    But now as search console detected as error for old url, I don’t know how to fix it.
    Please would you suggest me what should I do and fix the errors.
    Please mail your advice to me.
    As I cannot found it here.
    Thank you.

    1. Hello Smita,

      For the URLs you changed, you should set up 301 redirects from the old URLs to their new equivalents. Depending on what system you’re using, you’ll probably find a plugin to easily manage this.

      For the URL you removed, you can check if there is a fitting target (another URL with similar content) that you can redirect it to.

      I hope this helps!

  10. Hi Eoghan,

    Your report seems to be really helpful.

    But, when I am creating the same report in GA dashboard, it shows nothing. However, can see 404 urls in search console.

    Please check sample URL: –removed–

    I request you not to publish this comment with the mentioned URL. 🙂

    Thank you
    Anjali

    1. Hi Anjali,

      Your 404 page does not contain the Google Analytics tracking code, so it is not being tracked in GA currently. You should make sure your 404 pages are tracked in GA for the report to work. And even then, the report will only show URLs that have been accessed by users, so they won’t mirror what you see in the crawl error reports in GSC.

      As requested, I removed the sample URL from your comment.

      I hope this helps!

  11. Hi Eoghan,

    Great article, clear and well-written! Thank you for sharing.

    I have a slightly different question. Our 404 page includes four internal links suggesting to the user where on our site to go next.

    I’d like to see which of those links gets the most clicks – I would go by Previous Page Path on those specific four pages, but that necessitates using the 404 URL and not the Page Title.

    Do you have any suggestions on how I could get this data/track the next pages most commonly visited after the 404?

    Thanks so much!

    Alex

    1. Hi Alex,

      Thank you very much, I’m glad you found the article useful.

      I suggest you use Google Tag Manager to track the clicks on those links as events in Google Analytics. If you need any help with this, just let me know. I’ll be happy to send you some instructions.

        1. Hi Sneha,

          Are you referring to the same issue Alex mentioned above? Do you have a 404 page with links to other website sections and you would like to track the clicks on these links? If so, please let me know and I can share a quick instruction on how to do this with Google Tag Manager.

  12. Hi Eoghn Henn,

    Thank you for this great post.

    I migrated my site from Blogger to WordPress and I have been constantly watching out for any 404 errors. I see two referrers like Weborama Fetcher(weborama.com) and Addthis(my social media sharing plugin) on my 404 page.

    Should I just let them go or redirect them. These started appearing only after I installed the AddThis social sharing plugin.

    1. Hi Sheennaz,

      it would probably be a good idea to identify the root of this problem and fix it. To me it sounds like your Addthis plugin is generating URLs that don’t exist on your website that Google then tries to crawl. This is probably something you can fix in the configuration of the plugin. If you just ignore it, or even if you just set up redirects, this type of error is likely to show up again and again and you’d be wasting Google’s resources by having them crawl non-existent URLs.

      Please let me know if you need any help with this process.

  13. Hi Eoghan,

    Thanks for this wonderful post. For the last few days, I am getting international visitors from many different countries to this page https://ideasoncanvas.in/h/452665.html and its a 404 page. so, how I can I remove this URL? it is only showing in google analytics not in my wordfence plugin dashboard’s live traffic status.

    I have already redirected all 404 page to home page. but this doesn’t work for this url.

    1. Hi Sandip,

      This is difficult to analyse for me from the outside, but one thing I immediately noticed is that the URL you mentioned (https://ideasoncanvas.in/h/452665.html) does not seem to have a Google Analytics tracking code on it, so the traffic you are seeing for this page in Google Analytics might be due to your Google Analytics account being spammed. You can read more about this topic here: Understand and eliminate spam traffic in Google Analytics.

      I hope this helps point you in the right direction. If you have any additional questions, please just let me know.

  14. Eoghan,

    Thanks for a great article.

    One question though, I mainly rely on the IOS Google Analytics app and have several standard reports. Can the Custom Reports that you have suggested be created on the IOS Google Analytics App?

    Thanks

    Raul Gonzalez

    1. Hi Raul,

      Thank you for your comment. I’ve never used the iOS GA app, but I do use the Android one a lot and unfortunately, I’m not aware of a way to reproduce this kind of report in the app. As we need to combine at least three dimensions for this to work, the possibilities I know of in the app are far too limited.

    1. Hi Romain,

      Thank you for your comment. No, the name of the dimension is still the same. Were you looking at it in the exact same place as described in the article above? Sometimes, certain combinations of dimensions and metrics aren’t possible, so not all dimensions show up everywhere in the GA account.

      Another possibility that I can think of is that the dimension might have a different name, if you’re using GA in a different language.

      I hope this helps for now! Please let me know if you have any further questions.

    1. Hi Calvin!

      Thank you for your interesting question. The content of a page is not normally tracked in Google Analytics, so with a standard configuration, you wouldn’t be able to search the page content. You could configure your tracking setup so that it does track certain elements in custom dimensions in Google Analytics, which is not a very difficult thing to do if you’re using Google Tag Manager.

      I guess you’re asking this question because you’re working on a case where the page title does not allow you to identify a 404 page? Please let me know if you have any further questions about this. I’d be happy to help you.

  15. Thank you so much for this info. I set up my custom report to monitor my 404 errors.

    I do have a question that I am still unable to find help for regarding 404 errors.

    While in my GA looking at the top landing pages the first page is listed as /, clicking on it goes to a 404 error page – it’s my url but instead of .com its .com//.

    Any idea on how to fix this and understand what happened would be greatly appreciated.

    -Sirita

    1. Hi Sirita,

      Thank you for your interesting question. The problem you describe might be related to the “Website’s URL” setting in your view settings.

      You can go to the Google Analytics admin area > view settings and remove the slash from the domain in the field “Website’s URL”.

      If the domain in this field does end with a slash, then Google inserts an extra slash into the links from the reports to your pages.

      Please let me know if this helped solve your problem.

  16. Hi Eoghan – Thanks for the detailed write-up! Have you seen the URLs show up under Page while it is a perfectly valid URL? It’s happening to me in the 404 Errors from External Links report with some of the Page entries. What do you think could explain these?

    1. Hi Christina,

      The only explanation I can think of right now would be that sometimes URLs might give back a 404 error temporarily and then start working again. If you send me more details via e-mail, I’ll be happy to have a look at your particular case.

  17. Adding to my previous question about valid URLs showing up in the externally linking 404 errors custom report, I’m also noticing that the Full Referrer column only shows the domain name of the referrers, e.g., google or bing. When I use the Full Referrer dimension in the Referrers standard report, however, it shows the full URLs for most of my Google traffic, e.g, google.com/ads/slp. Has this happen to you?

    Thanks!

    1. Hi Christina,

      For every given session, the full referrer dimension should show the same value in custom and standard reports. The dimension contains the value that is actually passed to the browser in the referrer. Google, for instance, only passes “Google” for organic search. I don’t know what the referrer “google.com/ads/slp” stands for, but it’s another type of traffic from Google that is not “normal” organic search. If you see very different values in a custom report and your standard reports, that’s because you’re looking at different sessions (filtered for certain criteria in the custom report / all sessions in the standard reports).

      I hope this helps for now! Please let me know if you have any further questions.

  18. Hi !

    Thank you for this very good tutorial ! Is it possible to track broken outbound links with GTM and a custom script ? For affiliate links for example :).

    1. Hello Olwenn,

      I cannot think of a way to track broken outbound links with GTM that really makes sense, as this would involve requesting the link target (which is on another domain) and checking its status code, and this would probably only be triggered when a user clicks on the link.

      It would probably make a lot more sense to set up a periodic scheduled crawl (e.g. once a week) that checks all external link targets and reports broken links. You can probably do this with most crawling tools (you can certainly do it with searchVIU).

      I hope this helps!

  19. Hello, I have the custom 404 reports set up in my GA account, but I notice some of the links that show up as hitting the 404, are links that I have set up to be redirecting. They redirect when I click on them, but why are they still appearing on the report.

    1. Hi Tina,

      Thank you very much for your question. If you send me some more details, I’ll be happy to have a closer look.

      Best regards,

      Eoghan

  20. Hi Eoghan!
    Thanks for an amazing post. I have just implemented the 2 x 404 reports. GA isn’t displaying any 404s. Is this because I’ve only just created the reports – do I need to wait for the data to filter through. Or does this mean that we have 0 404s?
    Thanks again 🙂

    1. Hi Caroline,

      Thank you for your comment. There’s no need to wait for the data to filter through – the reports should work immediately. If there are no 404s shown, it could either be that you really don’t have any (which is fairly unlikely), or that the 404 page on your website is not set up as described at the beginning of the article. If you like, you can send me the URL of the website you’re working on and I’ll have a look.

      Best regards,

      Eoghan

  21. Hi Friend,

    I have a website – http://tirupatibalajidarshanonlinebooking.com/chennai-to-srikalahasti-car-package.html

    If i give a keyword chennai to srikalahasti car package in google chrome. This site is in 8th position in first page.

    Chennai to srikalahasti car package – sri ponniamman cabs
    http://tirupatibalajidarshanonlinebooking.com/chennai-to-srikalahasti-car-package.html

    If i click the link, I got an error 404 not found error was encountered while trying to use an error document to handle the request

    How to solve… If i entered in laptop, tablet, that website link is showing. no error. When i open in mobile i got an error.

    How to solve …. give me the solution…

    1. Thank you for your comment. I had a look at your problem and unfortunatley, I haven’t been able to come up with a solution. Here’s what I did find out:

      On the mobile version of Google, the URL that shows in the search results instead of http://tirupatibalajidarshanonlinebooking.com/chennai-to-srikalahasti-car-package.html is http://tirupatibalajidarshanonlinebooking.com/PLRmZ/UZoOZ/XgcjZ/RilOZ/TaSUZ/STWcZ/WknoZ/UclfZ/WiTiZ/TameZ/NNlPZ/TjPaZ/WWlZZ/QkaRZ/LhcmZ/chennai-to-srikalahasti-car-package.html (which returns a 404). Do you have any idea where the directories “/PLRmZ/UZoOZ/XgcjZ/RilOZ/TaSUZ/STWcZ/WknoZ/UclfZ/WiTiZ/TameZ/NNlPZ/TjPaZ/WWlZZ/QkaRZ/LhcmZ/” come from and why Google seems to have indexed this URL? Maybe you could check this URL with the URL inspection tool in the new Google Search Console to see if you can find more information about it. In any case, this looks like a very unusual issue.

      Unrelated to your problem, I noticed that the page http://tirupatibalajidarshanonlinebooking.com/chennai-to-srikalahasti-car-package.html has a canonical tag pointing to the home page, which you should probably remove or replace with a self-referencing canonical tag.

      I hope this helps! Please let me know if you have any further questions.

  22. Hello Eoghan,
    Thanks for an extremely informative post. I followed the instructions and created a Custom Report in G. Analytics. But I understand that this will just populate the broken links information going forward – correct?
    Please can you expand on the section to create the 301 redirects manually from the broken 404 urls to the current urls? That part wasn’t so clear in your post. Thanks in advance!

    1. Thank you for your questions. The custom reports should also show past data. If they don’t show any 404 errors yet, then this can either mean that you do not have any (very unlikely) or that the report settings need some tweaking. Have you checked if your 404 page is set up exactly as described at the beginning of the post? You might also have to change the “page title” filter value, if your 404 page does not contain the term “404”, but instead just something like “page not found”.

      You’re right, I don’t go into much detail about setting up redirects in the post. If you find a URL in the reports that gives back a 404 error, you should find a matching URL that actually works and set up a 301 redirect pointing from the broken URL to the one that’s working. “Matching” here means that the content of the redirect target is similar to the content of the old, broken URL. In some cases you might know what content used to be available on the broken URL, or you might have to guess. In other cases, the broken URL might not ever have had content on it, but you can tell where it should point.

      Example: The URL https://www.searchviu.com/en/404s-google-analytics/ returns a 404 error on this website, but I would 301 redirect it to https://www.searchviu.com/en/404-errors-google-analytics/, because I would assume that this is the correct version of the broken URL.

      The way you set up redirects depends on the system you are using. In WordPress, you would probably find a plugin that could help you. On some servers, you’ll be able to use a .htaccess file to set up redirects, and so on. You need to find a way that works for you.

      I hope this helps for now. Please let me know if you have any further questions.

  23. Hi Eoghan,

    Hope you’re well! I’m going through the 404s that have appeared in GA for internal links. There are 59 in total. However, I can’t find any of the broken links in the content (or anywhere, even when I view source). Could these be very old broken links or something like this?

    Hmmmm!

    Thanks,

    Caroline

    1. Hi Caroline,

      The broken URLs that show up in your report were accessed by a user (or a bot that executed the GA tracking code) in the time frame that you select for the report. If you like, you can send me a screenshot or an export via e-mail and I will have a look to see if I can find an explanation.

      Best regards,

      Eoghan

  24. Hi Eoghan
    My level of knowledge is fairly basic on GA – I have followed your helpful step-by-step guide however my GA reporting does not have the option on the Filter setting to exclude or include variables, it just has “+add filter”
    I’m not sure what that means, except its obviously not showing 404 error links – or what the report actually shows!
    Has GA changed it options, or am using an outdated version?

    1. Hi Ginny,

      Thank you very much for your comment. I am not aware of any recent changes to this area of Google Analytics and I believe the screenshots and instructions above are still up to date. It’s also not possible that you are using an outdated version, so maybe you just did not find the correct dimensions after clickin on “+add filter”.

      I’d be happy to help you set this up correctly if you like.

      1. Hi Ginny,

        the option to include / exclude variable appears after you click on the “Add filter”.

        My answer is a bit late, hopefully you found the solution already 🙂

  25. Nice blog. Very helpful Eoghan Henn.
    I have a query. Can you please solve it? Google is ranking my old website Urls, and in the new website the Urls have been changed. So old ranked Urls are showing 404 not found pages. How to resolve the issue?

  26. This one is a doozy and honest to goodness am sick to death of it. I am an artist on a site called https://www.redbubble.com I have been on there for 6 years and 4 years ago they asked all their artists to go on google analytics to track their traffic. I have been successfully doing that for 31/2 years but in January this year something weird started happening . When I would click on the little double box next to the link page someone had landed on I used to be able to click on the little double box and that would open the page the customer was looking at. Then in January something happened. 1 by 1 everytime I clicked on the little double box instead of a page up would pop a 404 error from redbubble.
    visited they are ALL 404 errors. Now I know people are seeing the pages as I still get sales everyday. But it is doing my head in. Is there something I can fix on Google Analytics . Is it a redbubble issue , or a combination of both. I have been emailing Redbubble back and forth for 3 months now . I have sent detailed reports. Spent hours writing emails. And still everytime redbubble gives me a “fix” it does nothing.

    Have you ever heard of anything like this before? It is driving me crazy because trying to decipher from a link that is 100 or more characters long what they looked at is such a time waster. Not to mention when people in non English speaking countries look at something and I get the foreign language link . Then I have zero idea what they looked at . Please help Redbubble are treating it like it doesn’t matter but it does to me , it determines so many things like what colours are trending, If one of my cushions/ tshirts / canvas has gone viral for some reason. and for me to then work out why. But if I can’t tell what it is I can’t do anything . I am desperate for anyone to explain what it indeed could be.

    Just to reinterate Google analytics worked perfectly for me on redbubble up until January this year. All my other stores whether my websites or 3rd party websites work perfectly when I click on the little double square next to the link . But Redbubbles do not

  27. Hi Eoghan,

    Thanks for this article – it’s a very user-friendly introduction to the somewhat complicated world of GA.

    I wanted to follow your steps for identifying ‘404 errors from internal links’. My unique problem though is that I’m stuck with a 404 style page that generates a page with an empty

    So, instead of adding the Include Filter Page Title is there a filter rule whereby I could target some repeating text that only appears on the 404 message pages?

    For example, the following string only appears on all my 404 pages:

    You are trying to access a page that no longer exists.

    Any help very gratefully accepted!
    Darragh.

    1. Hi Darragh,

      Yes, you could do this, but you’d first have to set up a tracking that extracts this information from your pages and sends it to Google Analytics. If you’re using Google Tag Manager, this should be fairly easy to set up. On the other hand, it might be less effort to try and add a title tag to your 404 page. What kind of setup are you using? I’d be happy to have a look and try to help.

      Best regards,

      Eoghan

  28. Hi, and thanks for helpful instructions.
    I hope you don’t mind me posting this questions which is slightly related and when trying to investigate it made me end up on this article. We did a website update and move to new server 3 weeks ago. Same domain but new url’s for around 260 posts and pages (solved with 301’s). In GA it says traffic (specially organic search) has dropped 65% but when looking in Search Console it shows a slight drop in traffic but not nearly as big. It SEEMS exposure and clicks on Google are fairly the same but either a) traffic are not coming through to actual site or b) traffic is not being tracked properly by GA.
    I know that the 301’s won’t be registered as organic search traffic in GA but this traffic should show up somewhere else, right? Not just disappear…

    When I started investigating this I found within 2-3 days that some of the 301 redirects were not working. Fixed that but no change.
    Then starting to look at if people ended up on 404 pages (how I got to your article) but that doesn’t seem to be the case either.

    We are aware of a few remaining issues:
    – a lot of internal links on old blog posts are still pointing to the old url:s. But the 301’s are working for these and we will slowly work our way to changing all of them (we’re 2 working on this website, none of us full-time…)
    – Search Console are still displaying the old url’s, not the new. Even though I’ve sent in the new sitemap etc.

    Any thoughts or experience of similar issues? Would really appreciate any insights if you have the time!

    1. Hi Eva,

      Thank you for your interesting questions.

      First of all, organic traffic should normally be recognised as such by Google Analytics, even if it’s coming through 301 redirects. As long as you haven’t configured your 301 redirects in a very unusual way, they pass on the referrer, which GA then uses to detect the traffic source.

      Have you checked on a page level (in the landing pages report) which pages have lost organic traffic? This might help with identifying the issue if it’s a technical one, e.g. the GA tracking code missing from certain pages.

      It’s difficult for me to make any other guesses without seeing the data, so if you like, you can send me more information via email and I’ll be happy to have a look.

      Best regards,

      Eoghan

  29. Thanks for the post it was very helpful, looking forward to using these reports. I’m still having issues finding the answer to my exact 404 problem. Launched a new website in August since then 404 page errors started occurring. Thought the number would go down over time, but it seems to be increasing. In GA looking at the month of November Behavior > Overview > Page the 4th-page listed is /page-not-found 8,674 page views 3.29%, this seems huge to me. 7,292 show the /page-not-found/ as the Landing Page (2nd highest landing page-first highest exist page). Is there a way to figure out where these page-not-founds are coming from?

    1. Hi Walker,

      This sounds to me like your 404 page isn’t set up correctly. When a URL that doesn’t exist on your domain is requested, it probably redirects to /page-not-found or /page-not-found/ instead of giving back a 404 error itself. See the beginning of this post for a short summary of how it should be set up. Before you can really analyse in Google Analytics which URLs are causing these errors, it is important to have the 404 page set up correctly.

      I hope this helps. Please let me know if you have any further questions.

  30. Hi! We updated our website a month ago and all redirects to the new domain have worked. GA is showing a /404.html?page=/ZW1haWwtZG&from= as one of our top pages visited and for the life of me can’t figure out what page that is! I’ve followed the behavior flow and it’s a direct search from our home page to the 404 through chrome. I’ve tested every link and they work. Ran a link checker an everything is good. Followed the custom report above and still nothing. How the heck can I find out what this page is?! We’ve asked google for a recrawl thinking it just needed time with the switch-over but still nothing. Any advice?

    1. Hi Megan,

      This might be due to some URL redirecting users to the weird page that is being tracked. If you send me an e-mail with the URL of the website we’re talking about, I can have a closer look to see if I find anything.

  31. I created a custom report but there is no data. I know I had some bad links because I found them myself. What might this mean?

    1. Hi Diane,

      If there’s no data in your report, this might be because your 404 pages are not tracked in the way that’s described at the beginning of the article or because you need to adjust the “page title” filter to match the titles of your 404 pages.

      If you can’t find a solution, feel free to send me some more info and I’ll be happy to have a look.

  32. Hi Eoghan,

    thank you so much for this post. I am fairly new to this so I appreciate any help I can get.

    I did the reports you described and at the external 404 Links are/were all referrals (direct). Is there anything I can do about it?

    It is given that I caused some of those because I was restructuring a bit and then tested it, but maybe it would be helpful to know for the future.

    1. Hi Simona,

      Thank you very much for your comment. The source is not just “direct” for actual direct visits (via the browser’s navigation bar), but also when Google Analytics is not able to detect the source for technical reasons. This can happen with links in newsletters that don’t use UTM parameters, for example. If you can’t detect the source of an externally linked 404 URL, you can still set up a 301 redirect to a matching target. You can also work on tracking your traffic sources better, in order to track less visits that aren’t really direct as direct. This article (in German) might help: https://www.more-fire.com/blog/kostenloses-spreadsheet-fuer-bessere-daten-google-analytics/

      Please just let me know if you have any further questions.

  33. I’m assuming there’s no way to confirm a user has actually clicked on a link on the page?

    I’m looking through my report now and it looks like a lot of them are users manually manipulating the URL as the links aren’t something that would be on the site

    Here are two examples I’ve found;

    /admin
    /contact-us telephone number

    1. Hi Neil,

      Thank you for your interesting question. You’re right, without setting up additional tracking features, you can’t confirm if a user actually clicked on a link to a 404 page or not. Your first example might actually be someone (or more likely a bot?) trying to find the login page to your backend. The second one does look like a broken link to me, “telephone number” being the anchor text that somehow ended up as part of the URL due to broken code. A crawl of the website with a tool like Screaming Frog can help to find broken internal links.

      I hope this helps! Please let me know if you have any additional questions.

    1. Are you referring to the URLs on your own website? The dimension “Page” only contains the URL path, but you could add the dimension “Hostname” to see the domain next to it. Please let me know if this answers your question.

  34. Hello Eoghan,

    This article really helps me a lot to fix my 404-page error thanks to this article.

  35. Thanks for the awesome information! Strange thing is the 404 list on the GA report is a bit different from what our Redirection plugin data says. I guess we’ll have to examine it a bit more.

    1. Hi Loma,

      Thank you very much for your comment. Your redirection plugin probably gets data from a different source (crawls? log files?), so we should expect differences. Please let me know if you have any further questions.

  36. This article was incredibly helpful with a problem I’ve been trying to solve!!

    Thank you so much for the easy-to-follow instructions!

  37. This is awesome! Your instructions for capturing broken incoming links (external 404s), along with the very helpful screen snapshot, worked perfectly! (The snapshot helped a lot because your narrative lost me on the last step where you add the page title regex.)
    The way google constantly changes analytics and search console, I am shocked that this post is 2 years old yet it still works.
    Hooray! Thank you so much!

  38. Thanks Eoghan, this is a really helpful guide.

    Is there any way of finding out what URLs a user might have typed in manually that would bring up a 404 page?

    Cheers,

    Matt

Leave a Reply

Your email address will not be published. Required fields are marked *