Summarize this blog post with:
Table of contents
- Two kinds of bots, and only one belongs in your GA4 reports
- Does GA4 filter out bots automatically?
- What fake bot traffic looked like on our site
- How to find bot traffic in GA4
- How to filter bot traffic in GA4, step by step
- Don't block the good bots by accident
- Does bot traffic affect SEO?
- See the crawlers GA4 misses with DidYouSEO
- Common mistakes
- FAQ
To filter bot traffic in GA4, first confirm which visits are fake (one city, one page per visit, no engagement), then remove them from your reports with an exploration segment, and stop them before they load your site with a Cloudflare challenge rule. GA4 already excludes known crawlers on its own, so the bots you are fighting are the ones that pretend to be people. The bots you want, such as Googlebot and GPTBot, never show up in GA4 at all, and seeing them takes a server-side tracker such as DidYouSEO's free bot traffic tracker.
That last point is where most guides go wrong. There are two very different kinds of bot traffic, and the fix for one can hurt you with the other. This guide separates them, shows the fake traffic we found on our own site, and walks through each fix.
Two kinds of bots, and only one belongs in your GA4 reports
| AI and search crawlers | Fake-visitor bots | |
|---|---|---|
| Examples | Googlebot, Bingbot, GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot | Scrapers and click bots driving a real browser, referral spam |
| Say who they are? | Yes, in the user agent, and you can verify the big ones | No, they pose as Chrome or Safari |
| Run your GA4 tag? | Almost never | Yes |
| Show up in GA4? | No | Yes, as real users |
| Good for you? | Yes: they get you ranked and cited in AI answers | No: they inflate users and wreck engagement numbers |
| What to do | Let them in, and track them server-side | Filter them from reports and challenge them at the edge |
AI and search crawlers fetch your page's HTML and leave. Most don't run JavaScript, so the GA4 tag never fires. Google also excludes known bots from GA4 automatically. We explain why your analytics can't see them in does ChatGPT actually crawl your website. Blocking them costs you rankings and AI citations, so nothing in this guide should touch them.
Fake-visitor bots run a real browser, so they load the GA4 tag like a person would. To GA4 they look like new users from a city you've never sold to. These are the bots this guide filters.
Does GA4 filter out bots automatically?
Yes, partly. Google's known bot-traffic exclusion removes traffic from known bots and spiders, using Google's own research and the Interactive Advertising Bureau's International Spiders and Bots List. It's always on, and you can't turn it off.
But it has two limits:
- It only knows bots that announce themselves. A scraper running headless Chrome with a normal user agent isn't on any list.
- You can't see what it removed. GA4 doesn't report how much known bot traffic it excluded.
So the automatic filter handles honest bots. Everything below is about the dishonest ones.
What fake bot traffic looked like on our site
From October 26 to November 14, 2026, our analytics recorded 236 page views from Beijing. Each one came from a different "new visitor" who viewed exactly one page and left, spread across well over 100 different pages. The traffic peaked between November 4 and November 8, at 20 to 63 views a day.
Our analytics is PostHog, which, like GA4, counts visits by running a JavaScript tag. So any tag-based tool, GA4 included, counts these as visitors. The pattern gave them away:
- One page per visitor, every time. Real people from a new market click around at least sometimes.
- A new visitor every time. The browser never kept its cookie, so every visit was "new".
- No leave event. People trigger a page-leave event when they close or switch the tab. These visits never did.
- Desktop Chrome from one city that had never sent us a real visitor before.
At the same time, a browser on Linux from a data centre in Groningen, in the Netherlands, sent about 45 "direct" visits to a single blog post. Same story: a machine, not a reader.
At the peak, on November 5, 63 of our 115 page views that day came from this bot traffic in China. More than half of our "traffic" was one machine.
How to find bot traffic in GA4
Look for the same fingerprints in your own property. In GA4, go to Explore, start a Free form exploration, and add these:
- Rows: City, then Operating system or Screen resolution
- Values: Sessions, Engaged sessions, Average engagement time per session
- Date range: the period where your traffic jumped
Then sort by sessions and look for rows like these:
| Signal | Why it points to a bot |
|---|---|
| A city or country you don't sell to, suddenly near the top | Bot networks run from data centres in a few cities |
| Engagement rate near 0% and engagement time near 0s | Bots load the page and leave without scrolling or clicking |
| Linux, or an odd screen resolution such as 800x600 | Headless browsers often run on Linux servers with default window sizes |
| Almost all users are new users | Bots usually don't keep cookies between visits |
| The traffic arrives as Direct | The bot has no referrer, so GA4 can't credit a source |
One signal alone proves little. A traffic spike from one city with zero engagement, all new users, and direct traffic is a bot.
How to filter bot traffic in GA4, step by step
Step 1: Exclude the bots from your reports with a segment
GA4 can't permanently filter by city, browser or screen size. So the reliable fix for reporting is a segment. In your exploration, create a session segment that excludes the pattern you found, for example City exactly matches Beijing AND Session engaged is 0 (not engaged). Apply it to every exploration you report from. If you report in Looker Studio, add the same exclusion as a report-level filter.
Segments don't change your data, so if you get the rule wrong, you just edit it.
Step 2: Use a data filter only for bots with known IP addresses
GA4's data filters permanently remove matching data from the moment you turn them on, but they can only match by IP address. If the bot comes from a fixed IP or range, and you know it:
- Go to Admin, then Data streams, choose your web stream, and click Configure tag settings.
- Click Show more, then Define internal traffic, then Create.
- Set the
traffic_typevalue to something clear, such asbot, and enter the IP address or range. - Go to Admin, then Data filters, click Create Filter, choose Internal Traffic, and set the filter to Exclude events where
traffic_typeisbot. - Leave it in Testing for a few days. Check the Test data filter name dimension in an exploration to see what it would remove.
- Switch it to Active only when you're sure.
Data filters can't undo past data, and their effect is permanent, so test first. You can have up to 10 per property. In practice this rarely catches modern bots, which rotate IP addresses. Our Beijing visits were each a new visitor, so there was no single address to block.
Step 3: Clean up referral spam with unwanted referrals
If the bots show up as referrals from spam domains, go to Configure tag settings, then List unwanted referrals, and add the domains. Know what this does: it stops crediting the referrer, but the sessions stay in your data. Use it to tidy your source reports, not to remove bots.
Step 4: Stop the bots before they load your site
The cleanest fix is to stop fake visitors at the edge, before the GA4 tag ever runs. If your site runs through Cloudflare, add a custom rule under Security, with the action Managed Challenge:
- Match the pattern you found, for example Country equals CN, or an outdated browser user agent.
- Add the condition "Known Bots does not equal true". This lets Cloudflare's verified bots, such as Googlebot and Bingbot, through without a challenge. Check that the AI crawlers you care about are on that list: Cloudflare removed Perplexity's crawlers from it after a dispute over robots.txt.
- Leave your API and login endpoints out of the rule. Apps and AI assistants call those directly and can't solve a challenge.
A Managed Challenge is better than a straight block. A real person in that country usually passes automatically or with one click, while a bot fails. On one of our sites, the rule challenged 722 requests with a 0% solve rate, which means none of them was a person. After we added rules like this, the Beijing visits dropped from up to 63 a day to a few.
The free Cloudflare plan includes five custom rules, which is enough for this.
Don't block the good bots by accident
This is where the two kinds of bots collide. Two Cloudflare settings can hit your AI visibility:
- Bot Fight Mode challenges anything that looks automated, and Cloudflare says you can't make exceptions to it with custom rules. It may also challenge API traffic. If you run an API, an app or an MCP server, prefer custom rules.
- AI crawler settings. Cloudflare now lets you allow or block AI crawlers by purpose: Search, Training and Agent. From September 15, 2026, new domains block Training and Agent crawlers by default on pages that show ads, while Search crawlers stay allowed. Cloudflare's own announcement warns that blocking Training can also block crawlers like Googlebot and Bingbot, which do both jobs. If you want to be cited in ChatGPT, Claude or Perplexity, check these settings.
After any change, test that the AI crawlers can still reach you with our guide to checking whether AI crawlers are blocked, or run the free robots.txt tester.
Does bot traffic affect SEO?
Fake visits in GA4 don't hurt your rankings directly. Google has said many times that it doesn't use Google Analytics data for ranking, as Search Engine Roundtable has reported. A bot that inflates your sessions doesn't change where you rank.
Bot traffic still matters for SEO in three ways:
- It breaks your decisions. If half your "growth" is a Beijing data centre, you'll double down on the wrong pages and misread every test.
- It can slow your site. Heavy scraping uses server resources, and a slow server hurts real users and Core Web Vitals.
- Blocking the wrong bots hurts most of all. If your fix stops Googlebot or the AI search crawlers, you lose rankings and AI citations. The fake visitors never did that.
See the crawlers GA4 misses with DidYouSEO
GA4 can only show you bots that pretend to be people. The other half of your bot traffic, the crawlers that decide whether you rank and get cited, never appears there. DidYouSEO's bot traffic tracker logs those visits from a small server-side snippet: which bot came, which pages it read, and whether it really comes from the company it claims. It recognizes about 30 crawlers, and it's included on the free plan with the last 3 days of visits.
That gives you both halves: GA4, cleaned with the steps above, for the people, and a server-side log for the crawlers. For the bigger picture, see who's actually reading your site.
Common mistakes
- Treating all bots the same. Blocking "bots" wholesale can take out Googlebot and the AI crawlers you need.
- Activating a data filter without testing. It's permanent. Run it in Testing first.
- Expecting a data filter to catch rotating bots. It only matches IP addresses.
- Using unwanted referrals to remove bots. It only changes attribution.
- Turning on Bot Fight Mode on a site with an API. You can't make exceptions, and your API clients may fail.
- Calling a traffic drop a disaster before checking for bots. Our "drop" was the bots leaving.
FAQ
Does GA4 exclude bot traffic automatically?
Yes, but only known bots. GA4 automatically excludes traffic from bots on Google's list and the IAB International Spiders and Bots List. You can't turn it off or see how much it removed, and it misses bots that pose as normal browsers.
How do I identify bot traffic in GA4?
Build a free form exploration with City, Operating system and Screen resolution as rows, and Sessions, Engaged sessions and Average engagement time as values. Look for a sudden city or country with near-zero engagement, all new users, and direct traffic.
How do I remove bot traffic from GA4?
Exclude it from reports with a session segment, and stop new bot visits with a Cloudflare challenge rule. GA4 data filters can only match IP addresses and can't remove data you already collected.
Does bot traffic affect SEO?
Not directly. Google says it doesn't use Google Analytics data for ranking. But bot traffic distorts your decisions, can slow your server, and blocking the wrong bots can cost you rankings and AI citations.
Why can't I see GPTBot or Googlebot in GA4?
Crawlers fetch your HTML without running the GA4 tag, and Google excludes known bots anyway. To see them, you need server logs or a server-side bot tracker.
Rank on Google. Show up in AI search.
Audit your site, track Search Console data and see if AI assistants mention you, in one dashboard.
- ChatGPT
- Claude
- Gemini
- Perplexity
No credit card required