How do I exclude traffic from an IP or a range of IP addresses?
To exclude all traffic from a given IP or IP range, log in Matomo (Piwik) as the Super User. Click on (Gear icon) ⚙️ > Websites > Settings > Websites/Measurables > Settings. You will find the option to specify “Global list of Excluded IPs”. Specify one IP address per line. Each Matomo admin user can also specify the list of IPs or IP ranges to exclude for specific websites.
You can define a given IP address, or IP ranges (132.4.3.*
or 143.2.*.*
for example) to be excluded from being tracked on all websites. You may also use the CIDR notation for IP addresses, for example: 112.4.2.0/24
, or 2001:db8::/32
.
When you exclude visits from these IP addresses, it will only apply to new visits going forward. Historical visits from these IP addresses will not be deleted.
Note: even if you have enabled IP anonymisation, IP exclusion will still work as expected (the IP exclusion occurs before the IP is anonymised).