Google Analytics / How to Exclude a Specific IP Address in GA4
To exclude visits from a specific IP address in Google Analytics 4 (GA4), first define that address as internal traffic and then configure a data filter to exclude it. Defining the IP alone does not remove the visits from standard GA4 reporting.
This is useful when visits from your home, office, company network, or development environment would otherwise distort your audience data. Start with the filter in Testing mode and activate it only after you confirm that the rule matches the intended traffic.
Define internal traffic in GA4
Select the web data stream
- Open Google Analytics and click Admin in the lower-left corner.
- Go to Data collection and modification ??Data streams.
- Select the web data stream for the website you are configuring.
Create an internal traffic rule
- On the web data stream settings page, open Configure tag settings under Google tag.
- Expand Show more, and select Define internal traffic.
- Click Create.
Add an internal traffic rule. The following values illustrate a rule for one public IP address:
| Field | Example value |
|---|---|
| Rule name | My IP |
traffic_type value |
internal |
| IP address match type | IP address equals |
| Value | 123.123.123.123 |
After you save the rule, events from the matching address are marked with:
traffic_type=internal
Exclude multiple IP addresses or a range
If you work from several locations, add the required IP conditions for home, office, or development networks. For example:
123.123.123.123 211.111.111.10 211.111.111.11
GA4 also supports IP ranges. A CIDR range may look like this:
211.111.111.0/24
That notation generally covers:
211.111.111.0??11.111.111.255
Confirm the exact range with your network administrator. An overly broad condition may remove visits from real customers or coworkers who should remain in the reports.
Exclude internal traffic with a data filter
Defining an internal IP address does not by itself exclude the visits from GA4 reports. You must apply a data filter to the events marked as internal.
- Go to Admin ??Data collection and modification ??Data filters.
- Open the internal traffic filter, commonly named Internal Traffic.
Use the following filter settings:
| Field | Setting |
|---|---|
| Filter type | Internal traffic |
| Operation | Exclude |
| Parameter name | traffic_type |
| Parameter value | internal |
Set a new filter to Testing first. Verify that internal events are identified as expected, then change the filter to Active. Once active, matching traffic is excluded from subsequent standard GA4 data processing.
Important limits of GA4 IP exclusion
The filter does not delete historical data
An internal traffic filter affects data processed after the filter becomes active. It does not remove visits that GA4 already collected.
A dynamic public IP address can change
Many home internet connections use a dynamic rather than a fixed public IP address. If the address changes, the old rule will no longer identify your visits. Check the public address periodically or use another internal-traffic strategy appropriate to your environment.
A VPN changes the visible IP address
When you connect through a virtual private network (VPN), websites usually see the VPN server's public IP address. Your original internal-traffic rule may therefore stop matching until the VPN address is included.
Do not define an unnecessarily broad range
A range can simplify configuration for an office network, but a broad rule may exclude genuine visitor data. Use an exact public IP address or the smallest verified range that covers the intended network.
Summary
GA4 IP exclusion requires two separate steps: mark matching visits with traffic_type=internal, then exclude that parameter with a data filter. Test the filter before activation, remember that it is not retroactive, and revisit the rule when a public IP address or VPN configuration changes.












