Marketing | Creative | Strategy

Your faithful partner in the discovery of endless digital opportunity.

Take the First Step

404 Error Pages And How To Hunt Them Down Using Google Analytics

While looking at a sales performance report for one of the clients that I was working with, I noted that two products were very often purchased together. Out of curiosity, I decided to explore this further. I visited the client site and typed the name of the product in the site search box. Nothing. Of course, that didn’t stop me in my endeavor, so I did a search on Google for “{Product Name} [Brand name]”. I ended up seeing the image of the product right away, however, I was immediately distracted by a more glaring issue which is that Google had displayed the URL of the non-existing page in its index. Suddenly my quest for the product couple had to be put on hold.

Our main goal as advertisers is to always put our best foot forward. We want our customers to visit product pages that provide value, and the last thing we want is for them to visit a not-so-good-looking 404 error page at the top of their Google search that leads them to nothing.

This discovery begs the question: Is there a way to use Google Analytics to see URLs of all 404 pages of a site that served as landing pages for people who performed a search on Google. After a little trial and error, and some creative workarounds, I have found a method. Here’s a step by step...

  1. First, we must trick the internet into giving us some valuable information. To do this, append a random combination of characters to the URL of your homepage: https://www.sitename.com/abcd1234. Visit that page and make sure it generates a 404. Which it should.
  2. Visit the source code of the page, and copy the value of its “Title Tag”. For this example let’s assume it is: “404 Not Found - Site Name”
  3. In Google Analytics use the “Date Range” selector to see traffic for the last 30 days. This is just so that you don’t end up looking at too much information all at once. Also, you want only relevant pages that have been visited recently.
  4. Go to Behavior > Site Content > All Pages report. Select “Page Title” as a primary dimension. This shows you a list of Title Tags of pages that generated pageviews in the last 30 days, as limited by your range.
  5. In the search filter type the title tag of the 404-page that you saved earlier. In our example it begins with “404 Not Found”:Google Analytics Filter: Page Not Found
  6. Hit that search icon and you will see something like the image below. Now it’s also important to note, that this will only show up if this 404 Error page has generated a pageview in the time frame that you have limited:Google Analytics - Pages with Page Title Not FoundIn the above example, you can see that our custom 404-page generated 78 pageviews in the last 30 days. That means 78 times people search for something, and Google delivered this error page, and they clicked on it. That’s 78 impressions you missed.
  7. Now go ahead and click on that “Page Title”. Once you do that, Google Analytics will continue showing you only pages with Page Title of “404 Not Found”: But the primary dimension will be changed from “Page Title” to “Page”:Google Analytics Content Reports PageviewsThese are the exact results we were looking for. What this shows us is a list of site URLs that generated 404 pageviews. However, it’s not time to celebrate just yet, we are not completely done. This shows us the pageviews (which could be generated by internal links to 404 pages). What we are really looking for is the entrances to our site through these pages, all the times people landed on these pages from Google rather from an internal site link… which is also something that should be fixed, but that’s for a later blog.
  8. Click on “Secondary Dimension” and select “source/medium”:Google Analytics secondary dimension source / mediumPageviews and their source / medium

This report alone can help you identify traffic sources that are sending visitors to non-existent pages of the site. Needless to say, it is not the best investment to send paid traffic to pages that generate 404, as shown in the following screenshot:
google / cpc

Let’s not get bogged down in paid, however, and focus more on SEO, since that is the scope of where we began this journey. To see URLs of landing pages that serve traffic from Google filter the results by “Source / Medium” dimension. The value to search for is “google / organic”:Google Organic

Visit the URL of one of the pages returned by the filter to see its response code. Most likely it will be “404 Not Found”. Now use Google’s “info” search operator to see if the page in question is indexed on the site:

info:https://www.sitename.com/YOUR_URL.

If it appears in Google search results when you search for the above query (make sure to replace it with your own actual URL, not the placeholder I used) then it is indexed by Google.

Now we’ve found all of the bad pages that are sending your users to a land of nowhere and nothing. Once you know this information you have two ways to go about it:

  • Set them to 301-redirect elsewhere, somewhere that is relevant and useful
  • Submit a URL Removal request in Google Search Console to get rid of the link entirely

The fix you choose for each page will depend on the value of each URL and where you’d like it to go and what you’d like to display.

The moral of the story is two-fold. First, you should always stay vigilant in finding paths along the internet superhighway that lead to nowhere when they SHOULD lead to your site. This is a wasted opportunity and not good for your overall brand image. The more important lesson, however, is to always let your curiosity lead you on a journey through your digital environment, because there is no telling what sorts of opportunities you may uncover. Happy digital trails!

Alex Kravchenko
Partner | Search & Digital Outreach
I am the search-engine whisperer. I deep dive through your website and uncover opportunities in organic search improvement, keyword optimization, and ultimate maximization of your ROI. I collate all of these opportunities into a series of executable SEO implementation guidelines and guide our web developers and marketing team to make sure it is set up to the highest scrutiny of optimal SEO best practices. Once it is running, I monitor and analyze your SEO statistics to ensure your SEO doesn’t step out of line again, after all, you just know how to speak it’s language.
close[x]

Get A Quote

Please fill out the quote form to the best of your knowledge. Once submitted, a Slicedbread representative will be back in touch with you as soon as possible.

* Required Fields