IP Filtering

IP filtering allows you to exclude specific IP addresses and CIDR ranges from your experiment data. This is particularly useful for excluding internal traffic that could skew your experiment results.

Note: IP filtering only affects experiment data collection. Users with excluded IP addresses will still see the experiment variants, but their data will not be included in your experiment results.

How to Set Up IP Filtering

To set up IP filtering for your project:

  1. Go to your domain settings.
  2. Click on "View Settings" in the Domain header.
  3. Scroll down to the "IP Address Exclusion" section.
  4. Enter the IP address or CIDR range you want to exclude in the input field and click "Add".
  5. Repeat for any additional IP addresses or ranges you want to exclude. There is no limit on how many you can add.

When to Use IP Filtering

IP filtering is particularly useful in the following scenarios:

  • Excluding internal traffic: If you and your team frequently visit the site, you might want to exclude your office IP addresses to prevent your own behavior from affecting the experiment results.
  • Excluding development environments: If you're running experiments on a development or staging environment, you might want to exclude those IP addresses.
  • Excluding known bots or crawlers: If you know certain IP addresses belong to bots or crawlers, you can exclude them to ensure your data only includes real user behavior. But we already have filtering logic for these as default.

IP Address Format

Single IP addresses must be entered in the standard IPv4 format: xxx.xxx.xxx.xxx, where each xxx is a number between 0 and 255.

Examples of valid IP addresses:

  • 192.168.1.1
  • 10.0.0.1
  • 172.16.254.1

CIDR Ranges

To exclude a whole subnet, such as an office network or a VPN egress range, add it in CIDR notation instead of listing every address. The prefix length can be anything from /0 to /32.

  • 203.0.113.0/24 — excludes 203.0.113.0 through 203.0.113.255 (256 addresses)
  • 198.51.100.0/22 — excludes 1,024 addresses
  • 10.0.0.0/8 — excludes the entire 10.x.x.x private range

The address you enter does not have to be the start of the range. 203.0.113.42/24 is stored as entered and matches the same addresses as 203.0.113.0/24.

Limitations

There are a few limitations to keep in mind when using IP filtering:

  • IPv6 not supported: Currently, only IPv4 addresses and IPv4 CIDR ranges are supported.
  • No wildcards: Wildcard notation such as 192.168.1.* is not supported. Use a CIDR range like 192.168.1.0/24 instead.

Tip: If you're using a VPN or proxy, make sure to exclude those IP addresses as well to ensure your own traffic is not included in your experiment data. Most VPNs egress from a known range, so a single CIDR entry usually covers all of it.

Related Documentation