Traffic Bot in Google Analytics – How to Block It Out?

Traffic Bot in Google Analytics – How to Block It Out?

Google Analytics is the most important source of information about website traffic. However, sometimes the information can be distorted by bots. How to avoid it? How to block bots from Google Analytics? Keep reading and find out!

Unfortunately, a scenario when the bot messes up with Google Analytics data happens quite often. The important thing is to realize that something’s wrong, catch the anomalies in the statistics, and block the bot so that the data obtained from the tool is the most accurate and useful business-wise.

During the last couple of days, the bot problems occurred on many websites. Suspicious traffic can come from addresses like:

  • /
  • /
  • /
  • /
  • /
  • /

Traffic Bot in Google Analytics

How To Check If  Traffic Bot Visited Your Website?

If you noticed any anomaly in the website traffic (such as presented in the picture above), you may suspect a bot has hit your site. You can confirm that in 2 places within Google Analytics:

1. Go to “Acquisition” -> “Organic Traffic”

finding traffic bot in Google analytics

2. Go to “Behavior” -> “Site Content” -> “All Pages” or “Landing Pages”

If you notice any significant traffic from the above-mentioned addresses your site has been hit by a bot! Now, it’s time to eliminate it so it won’t mess with your stats anymore.

How to Exclude Bot Traffic from Google Analytics?

1. Bot removal from the data already collected

Creating a new filter won’t do if you want to analyze data already collected within GA – it will only work with future data. In this case, the best way is to create a segment, that will remove the bot data from the display.

  • Click on “Add Segment” at the top of Google Analytics
  • Configure the excluding segment. “Conditions” -> Exclude sessions where the browser size contains (not set).

block traffic block from ga

After saving the segment, you can see traffic data that excludes bot data or comparing all data with the excluded ones.

blocking traffic bot

2. Creating a filter that will prevent collecting bot data in the future

  • Go to “Admin” -> “View” -> “Filters” -> “Add Filter”
  • Choose “Custom” filter-> filter field “Request URI” -> type in the filter pattern: .*trafficbot.*|.*traffic-bot.*|.*bot-traffic.*|.*bottraffic.*

google analytics traffic bot filter setup

  • Test the filter

google analytics traffic bot filter test

I recommend first creating the filter in a Google Analytics test view and then adding it to the main Google Analytics account if everything works fine.

3. Blocking bot in robot.txt file

Blocking the bot in the robot.txt file will make it impossible to enter your website. To do this, you need to add this code to your robot.txt file:

user-agent: bot-traffic,bottraffic,trafficbot

disallow: /

The above exclusion will work only on this specific bot – trafficbot, bottraffic lub bot-traffic. If your website will be hit by the differently named bot, you will need to adjust the blocking procedure similarly.

Marketing Team Leader - Kasia

Marketing Team Leader

Marketing and employer branding responsible since 2017. She wants Delante to be heard! Her experience has made her love design and analytical thinking, and that's how she approaches every task. A lover of travel and music, discovers new series in her free time or grabs the saxophone.
Comments (8)
    1. There is a . missing at the beginning, it should be

    2. You need to start with a . -> then the regex will work

      The . at the beginning, will solve this, otherwise the regex code starts with the repeat of nothing (which is the first *) and that’s invalid. Now it will start with any digit (.) and then repeat that (*) etc.


Leave a Reply

Your email address will not be published. Required fields are marked *

Recently on our blog

Are you curious about SEO of online stores or maybe you want to enter the Swiss market and wonder SEO abroad looks like? You will find answers to these questions and many other tips important for the development of your business on our blog.

What Is Ads Personalization in Google and How to Use It?

What Is Ads Personalization in Google and How to Use It?

Are you wondering how to attract potential customers who would actually be interested in your offer? Personalized ads will help you tailor the advertisements to the users, and make sure that you reach the right target group. Today, we'll tell you about Google Ads personalization and available functionalities.

Read more
Google Core Algorithm Update - May 2022

Google Core Algorithm Update - May 2022

It’s already a tradition that we write about the core algorithm update in May or June. Google releases a broad core update several times a year. Check out what it might mean for your website, is there anything to be afraid of?

Read more
Does Link Building Increase Organic Traffic? Importance of Link Building in 2022 Proved

Does Link Building Increase Organic Traffic? Importance of Link Building in 2022 Proved

Link building is an important element of every SEO strategy. Although it’s frequently disregarded, it can bring spectacular results when done properly - we managed to achieve 800% revenue growth! Selecting appropriate keywords and obtaining backlinks from thematically related websites will help you boost organic traffic to your site. Need proof? Read today’s article based on real-life examples!

Read more