This article is about Universal Analytics, which is going away. It's critical that you migrate your Universal Analytics property settings to Google Analytics 4, or you will begin to lose data on July 1, 2023 (July 1, 2024 for Analytics 360 properties). Learn how to migrate your settings.

Filter domain referrals

Reduce spam traffic from your Analytics data.
Referral traffic is the segment of traffic that arrives on your website through another source, like through a link on another domain. Analytics automatically recognizes where traffic was immediately before arriving on your site, and displays the domain names of these sites as the referral traffic sources in your reports.

You can create a filter that excludes traffic referred from selected domains. When you exclude referrers in this way, you are preventing all hits originating from those excluded websites from being part of your Analytics traffic. One reason to do this would be to prevent spam hits from polluting your legitimate hit data. A referral exclusion filter works by comparing the filter pattern you provide with the hit values found in the Campaign Source dimension.

Filtering domain referrals is different from the Property level referral exclusion feature. Filters remove the hits from your traffic stream, so no sessions from those hits will be recorded. Referral exclusion, on the other hand, treats hits that are referred from the excluded sources as direct traffic.

Exclude a single referrer

  1. Follow the instructions to create a new filter for your view.
  2. Set the Filter Type to  Custom.
  3. Click the Select filter type drop-down menu and select Exclude.
  4. Set the Filter field to Campaign Source​.
  5. Enter a Filter Pattern containing the domain of the referring source which you would like to exclude. For example,

Exclude multiple referrers

Use a regular expression in the Filter Pattern field to exclude several referring sources:



In the example above, the pipe symbol | is used as an "or" operator, meaning filter OR OR the .* Don't end the filter pattern with a pipe, as that will exclude ALL referral sources.

Related resources

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center