Conversion

GA4 spam traffic: how to spot and block it with the hostname filter

Gabriel Gervais
Gabriel Gervais

Partner · Strategy, advertising and measurement

October 13, 202620 min readLire en français →

Gabriel Gervais

Insights · Conversion

Write to Gabriel Gervais

A question about this article or about your situation? Your message goes straight to Gabriel.

A company address, preferably.
Reply within 1 business day

To block GA4 spam, first spot the fake traffic in an exploration, then list every one of your hostnames. Next, create a "Web hostname traffic" data filter in "Include only" mode, test it for a few days and activate it. Since September 21, 2026, this filter rejects data from any domain that is not on your list. It does not touch the Measurement Protocol or bots that actually visit your site, though. It does not clean your past data either. And it permanently deletes any legitimate domain you leave off the list.

Key takeaways
  • On September 21, 2026, Google added an "Include only" mode to the hostname filter, which launched on June 11, 2026 as exclude-only.
  • The filter also blocks every event with no hostname. Measurement Protocol events pass through unfiltered.
  • Since mid-September 2025, a wave of fake traffic from China and Singapore has been hitting sites around the world. The filter blocks only part of it.
  • Before activating, check the hostname of your sale and lead events, not just your page views.
  • An active filter deletes data permanently, in GA4 and in BigQuery. Past months are cleaned up with segments and comparisons.
On this page
Definition

Hostname

The hostname is the part of a page's address that identifies the site: in "https://www.example.com/contact/", it is "www.example.com". In GA4, every event carries the hostname of the page where the tag sent it. An event whose hostname is not one of your domains was not sent by your site.

What Google changed on September 21, 2026

Google added the hostname filter to GA4 on June 11, 2026, among the data filters in Admin. At the time it could only exclude: to block a spam domain, you had to know it and add it by hand, then start over with every new domain.

On September 21, 2026, the "What's new in Google Analytics" page announced the include mode. Google describes it as an allowlist of approved domains: anything not on it is rejected. According to Google, the allowlist simplifies configuration and needs little maintenance. The same announcement sets two rules that change how the filter should be configured:

  • Events with no hostname are blocked automatically. According to Google, a missing hostname typically indicates spam or abnormal traffic.
  • The Measurement Protocol is not filtered. Events sent from a server, with a secret key, pass the filter without being checked.
24 to 36 hbefore an active or testing filter takes effect on dataGoogle Analytics Help
10data filters at most per property, all types combinedPPC Land, citing Google
0data recoverable after an active filter, in GA4 or BigQueryGoogle, cited by Search Engine Journal

Many guides published before September 21 still describe a filter that can only exclude. On September 22, Search Engine Journal noted that Google's own help pages had not yet been updated. Since then, the help page on the web hostname traffic filter does list both operations: "Exclude" and "Include only".

The spam the filter blocks and the spam it lets through

"Spam" covers several problems in GA4. The hostname filter solves only one: data that reaches your property without coming from your pages. Your measurement ID (your property's "G-" code) can be read in the source of any page on your site. Anyone can use it to send fake visits or fake events without ever loading one of your pages.

Type of spamHow it arrivesBlocked by the include filter?
Ghost spam with no hostname or a foreign domainRequests sent straight to GA4 with your ID, with no visitYes
Your tag copied onto another site (cloned site, old site, staging)Your site's code runs on another domainYes
Ghost spam that imitates your hostnameThe hostname is declared by the request itself: nothing prevents faking itNo
Measurement Protocol eventsSent from a server with one of your property's secret keysNo: exempted by Google
Bots that actually visit your siteThey load your pages and fire your tag with your real hostnameNo

The last row often matters more than the others. GA4 already excludes known bots, combining Google's own detection with the Interactive Advertising Bureau's (IAB) international list. That exclusion cannot be turned off, and Google does not show how much it removes. Bots missing from the list reach your reports with your hostname, and the hostname filter can do nothing about them.

The wave of fake traffic from China and Singapore

Since mid-September 2025, site owners around the world have been seeing direct traffic from China (often from Lanzhou) and Singapore. The thread opened on October 6, 2025 in the Google Analytics Help Community has been marked by more than 470 people as the same question they had. Several of them describe traffic doubling overnight.

On November 10, 2025, Raúl Revuelta, a Diamond Product Expert in the Google Analytics Help Community, summed up in that thread what Google's teams had established. According to him, the spikes are likely caused by a new form of non-human traffic that bypasses the standard filtering systems. He describes three signs:

  • sessions that contain only the initial events (session_start and page_view), with no other interaction;
  • unusual concentrations of older devices and operating systems;
  • sudden spikes from unexpected countries or cities, often labelled "(not set)".

He recommended starting with exclusion segments in explorations, which delete no data. He also said a long-term spam detection fix was in development. As of October 13, 2026, we found no announcement of that fix in Google Analytics' "What's new" page.

Does the hostname filter block this wave? Search Engine Watch asked the question on September 29, 2026 and concluded that nobody had tested it yet. The answer depends on the hostname those sessions carry in your property. With an empty or foreign hostname, the filter blocks them. With yours, it lets them through. Step 1 is there to find out before you pick a tool.

Who sends this traffic and why?

Nobody knows. Google has confirmed that it is non-human traffic, but it has named neither its origin nor its purpose. None of the hypotheses going around has been proven. Here they are, with their authors, for the curious:

  • Harvesting content to train AI. This is the most widespread hypothesis. Breached Company (Andrew, founder of CISO Marketplace, February 17, 2026) sees it as industrial-scale data harvesting. Thomas Hillary, of Octiv Digital, reports a SEOSpot analysis that traces part of this activity to Alibaba and Baidu infrastructure. Its limit: it explains real visits, not data sent to GA4 with no visit.
  • Reconnaissance and testing of evasion techniques. The same Breached Company article reports a minority view among analysts: these bots would be mapping sites (servers, content delivery networks, protections) or testing their ability to get past firewalls and anti-bot tools.
  • Probing for security flaws. Kyle Rushton McGregor, of KRM Digital (December 31, 2025), notes visits that land on 404 error pages and non-existent paths, a sign of bots probing for known vulnerabilities.
  • A misleading location. Tim Ito, of Marketing Nice Guys (April 1, 2026), points out that GA4 locates a visit from its IP address: a cloud server, a proxy or a VPN shows the data centre's city, not a person's. According to Breached Company, the traffic may be routed through Singapore and the Lanzhou location may be inaccurate.
  • Traffic with no apparent purpose. Marcin Polak, of Delante (December 30, 2025), describes bots that wander through sites at random, down to filter and parameter URLs no visitor would click, like traffic "for the sake of traffic".

Some of these articles come from companies that sell security or measurement tools: read them as leads, not findings. For your GA4 property, the practical answer does not depend on the motive. It depends on the hostname those sessions carry and on whether they show up in your server logs.

Step 1: spot the spam in GA4

Don't filter anything before you have looked. In GA4, open a free-form exploration and compare recent months with a quiet period. Put country, city, hostname and session default channel group in rows. Then add operating system with version and screen resolution. As values, use sessions, engaged sessions, average engagement time and key events.

Fake traffic usually leaves several of these traces at once:

  • a sudden rise in direct traffic, with no campaign or publication to explain it;
  • cities or countries where you don't sell, such as Lanzhou or Singapore for a Quebec business;
  • sessions with no engagement, under ten seconds, with a single page view;
  • old systems (Windows 7 comes up often in reports) and screen resolutions that repeat exactly;
  • a "(not set)" hostname or a domain that isn't yours;
  • no key events: fake traffic rarely fills in a form.

Then compare with your server or Cloudflare logs. According to a DefiniteSEO analysis published in November 2025, a good share of the China and Singapore visits never show up in those logs. That is the sign of data sent straight to GA4, with no visit.

What you seeWhat it probably isWhat fixes it
Sessions with an empty or foreign hostname, missing from server logsGhost spam sent with your IDThe hostname filter in include mode (steps 2 to 5)
Sessions with your hostname, missing from server logsGhost spam that imitates your domainSegments and comparisons (step 6), server-side tagging
Sessions with your hostname, present in server logsBots that actually visit your siteFirewall rules at your host or in Cloudflare, segments (step 6)
Events with no page view, coming from a serverMeasurement Protocol, exposed secret keyReplace the secret key

Step 2: list your hostnames

The include mode flips the work around: you no longer track the spammers' domains, you keep an exact list of your own. A forgotten domain stops sending anything from the moment the filter is active. That data does not come back.

In the same exploration, keep the "Hostname" dimension in rows and pick a long period that covers your sales peaks: a booking engine used only in high season will not show up in a slow month. Then sort each hostname into one of four columns:

  • Your domains: the main domain (with and without "www") and every subdomain that sends data.
  • Legitimate third-party services: a booking engine, a ticketing platform or a payment page that carries your GA4 tag.
  • Spam and copies: domains you don't recognize, a staging environment, an old site.
  • Empty hostnames, shown as "(not set)": the filter will block all of them.

Then run the exploration again, filtered on your sale and lead events (purchase, generate_lead or your own key events). This is the check that matters most: a lost page view skews a report, a lost sale skews the profitability calculation of your campaigns.

The pitfalls of the list: payment gateways, cross-domain and empty hostnames

Payment gateways: two settings not to confuse

A payment gateway raises two different problems, fixed in two different places.

In the most common case, the customer pays on the provider's page (Stripe, PayPal, Moneris) and then returns to your confirmation page. Your tag does not run on the provider's page: its domain sends no data and does not belong in the filter. The problem lies elsewhere. On the return trip, GA4 can count the provider as the source of the visit and take the credit for the sale away from the campaign that brought it in. That is fixed under "List unwanted referrals", in your data stream's tag settings. Google's own example there is a customer paying on a payment provider's domain.

The second case is rarer and more dangerous. Some tools hosted on a provider's domain accept your GA4 tag: a booking engine, a ticketing platform, a hosted payment page or an external cart. Those pages then send events with the provider's hostname, often the most valuable ones in the journey (begin checkout, purchase). Without that hostname on the list, the filter can delete them. The hostname of your sale events, found in step 2, settles the question.

Cross-domain

If your measurement follows visitors from one domain to another (a store on a separate domain, one site per language, a separate blog, a landing page tool hosted by the vendor), every domain must be on the list. The cross-domain configuration and the hostname filter do not talk to each other: adding a domain to one does not add it to the other. A payment domain left out of the filter can make purchases vanish from GA4 while the rest of the journey looks normal.

"www" and subdomains

The filter offers four ways to compare: exact match, "begins with", "ends with" and "contains". It does not accept regular expressions. Benjamin Mangold, Google Analytics trainer and founder of Loves Data, recommends exact match and one hostname at a time. With exact match, "example.com" and "www.example.com" are two different hostnames: you need both.

The broader options open a door. "Contains example" also accepts "example-copy.net". "Ends with .example.com", with the dot, accepts all your subdomains without accepting a domain that merely ends with the same letters.

Events with no hostname

The filter automatically blocks any event with no hostname. Most of the time, that really is spam. But a custom setup can also produce events with no hostname, for example when the page location is replaced with a bare path ("/thank-you/" instead of the full address). If your sale or lead events show "(not set)" as their hostname, fix the setup before you activate the filter.

Google's legitimate copies

When a visitor reads your site through Google Translate, the page is served on a Google domain (for example "www-example-com.translate.goog"). If your tag fires there, those visits arrive with that hostname. The agency FourFront pointed out in August 2026 that these Google domains are legitimate sources. Keeping them on the list or not is a decision to make, not an oversight to discover later.

The ten-filter limit

A property accepts ten data filters at most, all types combined: internal traffic, developer traffic and hostname. Active "Include only" filters add up: an event is kept if it matches any one of them. If you already have an include filter for another purpose, review it before adding one.

Watch out

If your Google Ads conversions are imported from GA4, a purchase event blocked by the filter may also disappear from Google Ads. Automated bidding would then learn from fewer sales than actually happened. How to cross-check is explained in Conversion tracking: spotting actions counted twice.

Step 3: create the GA4 hostname filter in testing state

You need the Editor role or above on the property to create a data filter. In GA4, open "Admin", then "Data filters" under "Data collection and modification". Choose "Create filter", then the "Web hostname traffic" type. Name the filter, choose the "Include only" operation, the match type and the hostname, then leave the state on "Testing".

Step 4: validate the test

Allow 24 to 36 hours, then let the test run a few days to cover a normal week. In testing state, GA4 deletes nothing: it labels the affected events with the "Test data filter name" dimension. Build an exploration with that dimension and the event name in rows, then event count as values. Then filter on your filter's exact name. Check that none of your legitimate hostnames appear and that no sale or lead event is there.

Step 5: activate the filter and note the date

Open the filter, set the state to "Active" and save. The filter takes effect within 24 to 36 hours. Keep the validation exploration: you will use it again after every change.

The activation date becomes a break in your data series: sessions and conversion rate may shift without any change in your real traffic. Record the date where your team will see it, then compare periods after that date with each other, as with Shopify's change in how it counts sessions.

Step 6: clean up your past data

A data filter applies only to data received after it is created. The months hit by spam stay as they are. Three tools let you read them without the fake traffic, without deleting anything.

An exclusion segment in explorations

This is the method recommended in the Google Analytics Help Community for the China and Singapore wave. In an exploration, create a session segment that excludes the fingerprint you found in step 1. The example given in the thread: exclude sessions where the country is Singapore and the duration is under ten seconds. Combine at least two conditions (a location and a duration, or a hostname and a system) so you don't drop real customers from the same country. Then apply the segment to every exploration you use for analysis.

A comparison in standard reports

Segments only apply to explorations. In standard reports (acquisition, pages, conversions), add a comparison that excludes the hostname or locations of the fake traffic instead. It hides the data in the current view without deleting it. You have to redo it report by report, so keep the list of conditions in a document the whole team uses.

A filter in your dashboards

If your reporting runs through Looker Studio or the BigQuery export, apply the same filter there once and for all. It is often the simplest way to keep management dashboards clean.

One limit to know: explorations go back no further than the property's data retention period (2 or 14 months in the free version of GA4). Standard reports are not affected by that setting. To compare one year with another, check that retention is set to 14 months. It does not apply retroactively, though.

Step 7: keep the list up to date

Every new domain goes on the list the day it goes live: a new store, a campaign microsite, a booking tool, a site in another language. Name the person responsible. The filter gives no warning when it blocks a legitimate domain: it keeps no record of what it has discarded. Also rerun the step 1 exploration every month, since spam changes shape.

What the hostname filter does not do

It lets the Measurement Protocol through

The Measurement Protocol is used to send events from a server, such as a refund or a sale closed offline. It requires a secret key created in the data stream settings. Google asks that it be kept confidential and never exposed in a site's code: a leaked key lets anyone send arbitrary data into your property. If spam arrives that way, replace the key. To go further, server-side tagging lets you validate requests before they reach GA4. It does require more setup and paid hosting.

It does not check the real origin

The filter reads the hostname the request declares. A spammer who sends fake data using your own domain therefore passes the filter. The include mode reduces spam; it does not make it go away.

It cannot see bots that visit your site

A bot that actually loads your pages carries your hostname. Those are spotted by their behaviour (step 1) and blocked before they reach your site, at your host or in Cloudflare. Blocking a whole country also shuts out the real customers who are there: if you do it, keep an exception for verified bots such as Googlebot.

Our own site as an example

On falia.co, the measurement tag loads only if the page's hostname is exactly "falia.co" or "www.falia.co". Staging copies and workstations therefore send nothing to GA4. Payment for the consultation happens on Stripe's page, where our tag does not run, and the visitor then returns to our confirmation page. Stripe therefore belongs in the unwanted referrals, not in the hostname filter.

A check in the code has one limit, though: it only sees visits that go through our pages. Requests sent straight to GA4 with our measurement ID go through no page at all. That is the door the include mode closes. For our site, the list comes down to two hostnames in exact match. Pages read through Google Translate are not on it: our tag does not load there.

Most business sites have a longer list. A Shopify store with a blog on another domain, one site per language or a booking engine is enough to double it. That is why the hostname exploration comes before the filter, never after.

What this means for you

The seven steps in brief

  • Spot the fake traffic and its hostname before you pick a tool.
  • List every hostname you have, then those of your sale and lead events.
  • Separate the gateways where your tag runs (to include) from those where it doesn't (to declare as unwanted referrals).
  • Test for a few days, activate, then note the date in your reports.
  • Clean up past months with segments and comparisons, then protect your Measurement Protocol secret key.

The include mode blocks the spam that does not know your domains. It also permanently deletes every legitimate domain you forgot to give it.

Our GA4 audit lists your hostnames, your gateways and your sale events before an irreversible filter is switched on.

To then connect clean data to your sales, see Conversion tracking: connecting your campaigns to actual sales. The limits of measurement without consent are explained in Consent and measurement: understanding Google Consent Mode's limits.

Reliable data is the starting point of the goal Improve your site's conversion.

To filter GA4 traffic without losing a sale, we review your full setup: see the GA4 audit.

Frequently asked questions about GA4 spam

How do I block spam in GA4?

First spot the fake traffic in an exploration, then create a "Web hostname traffic" data filter in "Include only" mode, with the list of your domains. Test it for a few days before activating it. The filter blocks spam that arrives with no hostname or with a foreign domain. It blocks neither the Measurement Protocol nor bots that actually visit your site.

Why am I getting so much traffic from China and Singapore in GA4?

Since mid-September 2025, a wave of non-human traffic, mostly from Lanzhou and Singapore, has been hitting sites around the world. In the Google Analytics Help Community, a Product Expert explained in November 2025 that it bypasses GA4's usual filters. He recommended exclusion segments in explorations. If those sessions carry an empty or foreign hostname, the hostname filter blocks them too.

Who sends the China and Singapore traffic in GA4?

Nobody knows. Google has confirmed that it is non-human traffic, without naming its origin or purpose. The hypotheses going around (content harvesting for AI, reconnaissance, probing for flaws, misleading data centre locations) come from agencies and blogs. None has been proven.

Does the hostname filter remove spam from my old reports?

No. A data filter applies only to data received after it is created. To read a past period without the spam, use a segment in explorations or a comparison in standard reports: they hide the data without deleting it.

Should I add Stripe or PayPal to the list?

Only if your GA4 tag runs on their pages, which is rare. In the common case, the customer pays at the provider and comes back to your site: the provider's domain goes into "List unwanted referrals", not into the filter. Check the hostname of your purchase events to be sure.

Can data blocked by mistake be recovered?

No. Data discarded by an active filter is never processed: it appears neither in GA4 nor in the BigQuery export, even if you fix the filter afterwards. That is why Google recommends starting in the "Testing" state.

How long does the filter take to work?

Google says 24 to 36 hours, in testing as in active state. Let the test run for several days to cover a normal week before activating.

Why do I still see spam after activating the filter?

There are three possible causes. The spam arrives through the Measurement Protocol, which the filter does not touch. It imitates your own hostname. Or it comes from bots that actually visit your site. The filter only handles spam that does not carry one of your domains.

Do subdomains have to be included one by one?

With exact match, yes: every subdomain that sends data must be on the list, as well as the version with and without "www". The condition "ends with .yourdomain.com", with the dot, accepts all subdomains at once. Keep in mind that a property accepts only ten data filters.

Sources and references
  1. Google Analytics Help, What's new in Google Analytics, entries of June 11 and September 21, 2026, accessed October 13, 2026. Source for the include mode, the blocking of empty hostnames and the Measurement Protocol exemption.
  2. Google Analytics Help, Web hostname traffic filter, accessed October 13, 2026. Source for the interface path, match types, filter states, the 24 to 36 hour delay and the validation method.
  3. Google Analytics Help, Data filters, accessed October 13, 2026. Source for how "Include only" filters add up.
  4. Google Analytics Help Community, Google Analytics 4 Bot Traffic Increase from China / Singapore on WordPress Sites, thread opened October 6, 2025, recommended answer by Raúl Revuelta (Diamond Product Expert) of November 10, 2025, accessed October 13, 2026. Source for the signs of fake traffic, the exclusion segment and the fix in development.
  5. Search Engine Watch, Martin Ashmere, Spam in Google Analytics? Here's what its new filter can block, September 29, 2026. Source for the question of the filter's effect on the Singapore wave.
  6. DefiniteSEO, Param Chahal, GA4 Bot Traffic Spike From China (Lanzhou) and Singapore, Solution, November 20, 2025. Source for visits missing from server logs and for Windows 7 systems.
  7. Breached Company, Andrew (CISO Marketplace), We Got Hit by the Mysterious Lanzhou Bots, February 17, 2026. Hypotheses of AI harvesting, reconnaissance and routing through Singapore.
  8. Octiv Digital, Thomas Hillary, Seeing a Lot of Traffic from China and Singapore in Your Google Analytics?, accessed October 13, 2026. SEOSpot analysis reported on Alibaba and Baidu.
  9. KRM Digital, Kyle Rushton McGregor, How to Fix the China & Singapore Bot Issue, December 31, 2025. Hypothesis of probing for flaws.
  10. Marketing Nice Guys, Tim Ito, A Traffic Spike from Ashburn, VA or Lanzhou, China?, April 1, 2026. Hypothesis of data centre locations.
  11. Delante, Marcin Polak, GA4 is recording unusual traffic spikes from China and Singapore, December 30, 2025. Hypothesis of traffic with no apparent purpose.
  12. Search Engine Journal, Matt G. Southern, Google Analytics Hostname Filters Can Now Allowlist Your Domains, September 22, 2026. Source for the documentation lag and the data being unavailable in GA4 and BigQuery.
  13. PPC Land, Luís Rijo, Google Analytics filter blocks data from domains not on an approved list, September 22, 2026. Source for the ten-filter limit and the Editor role.
  14. Loves Data, Benjamin Mangold, Hostname Filter in Google Analytics 4, June 12, 2026, updated September 24, 2026. Source for the exact-match recommendation and the lack of regular expressions.
  15. FourFront, Using the Hostname Filter for Accurate Google Analytics Data, August 12, 2026. Source for legitimate Google domains such as translated pages.
  16. Google Analytics Help, Identify unwanted referrals, accessed October 13, 2026. Source for the payment provider example.
  17. Google Analytics Help, Known bot-traffic exclusion, accessed October 13, 2026.
  18. Google Analytics Help, Data retention, accessed October 13, 2026. Source for the 2 and 14 month periods and their effect on explorations.
  19. Google for Developers, Send Measurement Protocol events to Google Analytics, updated October 9, 2026, accessed October 13, 2026. Source for the secret key and the instruction not to expose it.
Gabriel Gervais
Gabriel GervaisPartner · Strategy, advertising and measurement

Gabriel almost always takes your first call and carries out your audit. He builds the strategy starting from your growth goal: where to put your budget, which market to test and how to connect each lead to a real sale in your CRM. He mainly leads engagements for three goals: Optimize the profitability of your digital campaigns, Develop a new market, and Generate demand and growth. With Geneviève, he also works on organic search (SEO), AI visibility (GEO) and conversion rate optimization (CRO). The sales a Google Ads or Meta Ads campaign brings in depend on the page that receives the click. He writes mainly about marketing strategy, paid advertising and measurement.

About Falia →

Keep reading

Tout Conversion →
Other topicsStrategySEOPaid advertisingConversionAI visibilityWeb design
← All insights