Considering all your digital marketing priorities, fixing a 404 error page might seem not to be worth it… and yet you shouldn’t ignore it.
Content, links, and pages on websites change all the time. Therefore, seeing a 404 Page Not Found error may certainly not be the end of the world, but it can be a big deal for your visitors and your business.
This error can appear for several reasons, most commonly when a page’s link is broken or unavailable. Regardless of the reason, you don’t want a potential buyer to leave your website and go to your competitor’s site because your landing page was invalid.
To avoid this waste we’ll look at how to find 404 errors in GA4, and how to fix them.
What we’ll cover:
- What Is the Meaning of a 404 Error?
- Is 404 Error Bad?
- How Do I See 404 Errors in Google Analytics 4?
What Is the Meaning of a 404 Error?
Chances are that you’ve come across this issue before. You’ve clicked on a link that took you to a page that was not available and displayed a 404 error page not found.
Technically, a 404 error is part of the list of HTTP status codes. These are messages that a web server sends to reply to a request made by a client.
The client side, which includes devices (computers, smartphones, and tablets) and software (i.e., your browser) is responsible for sending requests to access resources to a server.
The server side then sends a response that gives you access to the resource or lets you know the status of the resource, such as a 404 error, if the resource is not available.
There are various potential causes for this error:
- when users follow links pointing to a web page that’s been removed or relocated (also called dead or broken links)
- when users misspell a URL
- when deleting pages of a site without using a 301 redirect
- when modifying part of an URL like the page slug or category name
- when transferring a website to a new domain without redirecting old URLs
- when a domain doesn’t exist anymore
- when the server cannot find the resource
- when the server decides to hide the resources from unauthorized clients
Is 404 Error Bad?
While it is true that a 404 error does not directly harm your site’s visitors, it does harm your site’s reputation and usability.
When a visitor lands on a page that does not exist, they are presented with a 404 error, which is not very helpful and does not solve their problem. Visitors will not likely return to your site if they encounter too many 404 errors.
This is bad news, especially if you’re sharing a sought-after resource or a competitive product.
The first impression visitors get of your site and the speed at which they can find what they are looking for occurs in a matter of seconds. Fail at this user experience and you will lose sales and traffic.
Besides user experience, 404 errors can hurt your website’s SEO.
Search engines like Google find it difficult to crawl your site if there are too many 404s. Google has a limited amount of time and pages to crawl, for instance.
To lessen your server’s workload and its resources, it will determine the frequency and percentage of your website that will be crawled and ranked.
Your goal is to have search engines crawl and rank as many key pages as possible quickly. Many 404s will result in fewer key pages of your site to rank in the SERP.
How Do I See 404 Errors in Google Analytics 4?
There are a few ways you can track and see where 404 errors are in Google Analytics 4. The one we’ll cover first is practical and fast depending on your error page title.
If your error page title is not descriptive or indiscernible from other pages from your site, then you should use the alternative method we’ll discuss later.
The first step to tracking 404 errors in GA4 takes place on your website.
How to check a 404 error page on a website? Simply visit your website by typing in an URL that doesn’t exist and look at the title.
For example, I’ve entered here a nonexistent page path on our website: https://measureschool.com/doesntexist
Here we have a Page not found for the page title.
Using the same title, we can go to GA4 to find a report summarizing all the same pages. This is a report with all the pages containing a 404 error.
Checking your site’s page title error is the initial step because some websites have different names, so you’d want to use what is on yours.
The Page not found is pretty common on 404 errors, so let’s take a look at another example, so you understand why this step is important.
Google Analytics 4 has a demo account everyone can use for free and that is connected to its online store. So, why not see how Google displays its 404 messages on its website and how we can find it in GA4?
To do this, I simply added whatever to the shop link of the Google Merchandise Store. Like so https://shop.googlemerchandisestore.com/whatever
The page shows up as expected with a title in the header saying Page Unavailable.
To make sure this is how the page was written, hover on the tab (if you have multiple tabs open), and you’ll see the original title. In our case, it is Page Unavailable.
The second step is seeing the list of errors. We’ll continue using our example from the Google Merchandise Store, but the same applies to any website.
1. Jump into GA4 and in the left navigation, click on Reports.
2. Then click Engagement, followed by Pages and screens.
3. In the search bar, type your error page title.
4. Make sure that the dimension is set to Page title and screen class.
So far, we’ve found a way to see 404 errors in GA4. But this information doesn’t provide much insight into where these errors occurred and how they can be fixed.
To do so, we’ll add the Page path and screen class as a secondary dimension.
5. Click on the + sign.
6. In the list of dimensions that pop up, select Page/screen, and then select Page path and screen class.
Here is the list of 404 pages on the Google Merchandise Store with the corresponding URLs where they can be found.
The same can be done for other websites.
🚨Note: If for any reason, you can’t see 404 error pages in Google Analytics 4 (after everything we’ve done in the Pages and screens report section), you can create a custom report as an alternative.
Whether the information in the Page and screens report is visible or not, creating a custom report allows for an in-depth analysis.
To access Explorations, click Explore in the left navigation panel.
Start a new exploration by clicking on the blank report that has the + sign.
In Dimensions, click the + sign and type Page in the search bar.
In the search bar, type Page. Select all of the following from the list of suggestions: Page path and screen class, Page referrer, Page title, and Event name.
Click Import, so they can be added to your report.
Repeat the same for the Event name.
🚨Note: These dimensions can also be used as filters. We will later use the Event name and Page title in our filters.
What is the purpose of choosing these dimensions?
- Page path is so we can identify where the errors occur by seeing part of the URL.
- The Page title is needed to find error pages in GA4 as we saw earlier. Page URL details don’t always have those of the page titles. We will also use the Page title to filter our data.
- Page referrer is so we can identify which was the previous page visitors were on before landing on the error page. This is very helpful to find out pages with links to the error page that need to be changed.
- We use the Event name so we can easily distinguish which event we’re interested in.
Let’s add a metric. Go to Metric and click the + sign.
There are a few metrics we could use for our analysis depending on what you want to measure. Are you interested to know how many users are landing on the error page?
Then use the Active users metric.
You can use Sessions instead as well to see how 404s are affecting your site’s attractiveness (how much percentage 404s occupy per session) and user engagement of your site. Compare the number between Sessions (those without 404 errors) and those with 404 errors.
In our case, we’ll use Event count. Event count will help us understand how many times users triggered the error, or in other words, the exact total number of times these errors were triggered.
Want a quick read to get a hang of what Sessions, Event count, and other Google Analytics 4 metrics are? Then check our 10 GA4 metrics to better understand your user behavior.
Now we have everything we need to start building our report.
From the variables panel, drag Page path and screen classes, and Page referrer into Rows.
Do the same for the Event count, but drag it into Values.
🚨Note: You can do the same by double-clicking. GA4 will directly send them to their respective Rows and Values.
Now we will filter our report using the Page title and Event name.
Start dropping the Page title into Filters. Click Select match type then select contains.
In Enter expression, start typing the error page title. If you start typing your page title, GA4 will autocomplete the rest and show you a list of pages. Select yours then click Apply.
In our case, we just wrote Page and selected Page Unavailable from the drop-down.
We’ll also add the Event name as a filter. Why? Because without specifying the event name, our report will show data for all events (which includes all clicks, scrolls, video events, etc.).
Since we’re only interested in pageviews, we repeat the same steps we just did for the previous filter. However, we’ll select Exactly matches in the Select match type, and we’ll finally select page_view from the dropdown.
Here’s a complete example of our exploration look and format:
🚨 Note: You can also use Slack to receive notifications for 404 errors, conversions, leads, or any other website activity.
Does Google Analytics 4 Track 404s?
Yes. GA4 automatically tracks 404 error responses. You can quickly access this data by searching for your error page in the Pages and screens report section. However, your 404 error pages must be properly configured.
For example, make sure that the page title tag of your error page is descriptive enough so you can identify it in GA4. Common 404 page titles include “page not found.”
If for any reason, this method doesn’t work, you can build an exploration report as we detailed in this post.
Parameters such as page location, to know the URLs where errors occurred, aren’t necessary because they are tracked automatically by GA4. You can use this event to build a custom exploration report, as well.
How Do I Fix 404 Errors?
There are a 2 popular fixes for this problem:
1. 301 redirect to a relevant page
2. 301 redirect to the homepage
1. Redirecting visitors to a relevant page is okay only if a new page has the correct information. Visitors can still find what they were doing without having to search for another website.
Note that you should be careful with bulk 301 redirects for 404 error pages.
2. Using 301 redirects to send all pages with broken links to the home page. The issue with this approach is that Google may not transfer the value, reputation, and authority (aka link equity or ‘link juice’) of your old URLs to the new ones. It’s also best practice to redirect to pages sharing similar topics.
Note that there are plugins that can create 301 redirects for all of your site’s broken links.
🚨 Note: If you’re having an unexpected spike of users on your website or your traffic suddenly dropped dramatically, it is now possible to detect these abnormal patterns in your data with anomaly detection in GA4.
If you don’t keep track of your 404 errors, Google will surely track them for you and possibly dent your SEO. Thankfully, Google Analytics 4 makes it easy to determine where on your website 404 errors are happening and which pages are affected.
The point is not to get rid of all of them, but at least to lower them significantly to keep both users and Google happy. We first looked at how to find 404 errors in GA4, then how to fix them.
This was a good exercise to understand how events and filters work in exploration reports. If some aspects seem new to you or if you need a refresher on how this works, we recommend learning how event tracking and explorations work in GA4.