Thanh Nguyen
WordPress & Matomo Freelancer

Exclude IP addresses in Matomo

Exclude the IPs of unwanted visitors and robots in Matomo to improve the relevance of visit statistics
Table of contents

IPs may be excluded from Matomo tracking for various reasons. The first IPs that are entered are often those of the places where the users are connecte to the website (office, home).

IPs to exclude for all websites

If you manage a Matomo server and deals with several measurable items to track, it is possible to create a global list which will be applied to all devices.

  1. Go to the Administration dashboard by clicking on the cogwheel icon of the navbar;
  2. In the Websites section, click on Settings;
  3. The first available parameter displays the Global list of Excluded IPs field. Enter the IP addresses to be excluded here. Skip a line after each IP.

IPs to exclude for a specific website

You can customise the list of IPs to be excluded for a specific website.

  1. Go to the Administration dashboard;
  2. In the Websites section, click on Manage;
  3. The page displays the list of measurable elements;
  4. Select the website;
  5. Scroll down the settings to the Excluded IPs field and enter the IP addresses to be ignored.

Exclude robots and unwanted services

As you may know, websites often have unwanted visitors or known services that you don’t want to include in your Matomo statistics.

In most cases it is possible to isolate and exclude robots by their user agent. However, because some robots use common user agents, you need to be able to exclude them via their IP addresses.

Case study

On the Matomo instance that we use to track traffic of the website Auvergne-Rhône-Alpes Tourisme Pro, we noticed connections from Norway. These connections initiated sessions at regular intervals and only made requests to the home page. Neither the user agent (blink) nor the country of origin of the connection could be used as a filter. All we had was the IP address.

You have certainly chosen to anonymise the IPs of the visitors, and in the vsits log all the IPs end by a 0.

We have to use wildcards.

Mise en application

Exclusion of IPs with network ID 146.247.137 and a host between 130 and 139


Exclusion of IPs with network ID 146.247.137 and a host between 0 and 255


After a few adjustments, we were able to filter out unwanted connections without blocking genuine users connecting from Norway.

Use Matomo segments to exclude robots

Often, it may take a moment before we can identify malicious or undesirable connections and. We need then to use a segment to filter the data already collected.

I hope this post was useful to you, please feel free to share it. You can also read about the other topics related to Matomo.

I’m Thanh Nguyen, I build fancy and ergonomic websites since 1998 and Zidane’s double in the World Cup final.

Leave a Reply

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

Related posts

Rechercher sur le site