Thanks for sharing this. Blocking by ISP/ASN can be much more practical than maintaining long IP or CIDR block lists, especially when dealing with traffic from cloud providers or known bot networks.
One thing I’d suggest is being a bit careful with broader entries like amazon.com, Fastly, or Google Virtual Private Cloud. They host plenty of legitimate services as well, so blocking them outright could filter out valid visitors depending on your audience.
For anyone trying this, I’d recommend monitoring the logs for a while after adding new organizations to make sure you’re not accidentally blocking legitimate traffic. Overall, it’s a useful approach for reducing unwanted bot traffic with much less maintenance than IP-based blocking.
Blocking unwanted traffic by ISP or ASN name could be useful for sites dealing with recurring spam or bot activity. It would be even better if Matomo allowed administrators to create flexible rules based on ASN, IP ranges, or other traffic characteristics without accidentally blocking legitimate visitors. A clear logging or preview option would also make these rules safer to manage.
Good approach. ASN/ISP blocking can be much more effective than maintaining huge IP lists, but start with clearly abusive hosting providers and monitor for false positives before blocking large networks like Google or Amazon.
Attention! The option via the config.ini.php is obsolete:
Tracking Spam Prevention
5.2.0 - 2026-08-10
Added an “Organisation block list” setting to the UI (General Settings, shown while “Block tracking requests from the cloud” is enabled) to manage the organisations blocked by that feature. Existing block_geoip_organisations config values are migrated to the new organisation_block_list system setting and removed from the config file; an emptied config list is migrated as an empty list, keeping organisation blocking disabled, while a removed config key results in the default block list applying again
The list is yet here:
→ Settings → System → General settings → TrackingSpamPrevention → Organisation block list
ASN/ISP blocking is a solid alternative to maintaining huge IP lists. Just be cautious with broad providers, since legitimate users may share those networks too. Start with obvious spam sources and monitor the results before adding more.
Blocking an ISP or ASN by name sounds useful, especially when the same sources keep generating tracking spam. It would be helpful if the feature could support clear matching rules so legitimate visitors from the same provider aren’t accidentally blocked.