Skip to content

Blocklist: IPs and hostnames

Block specific IP addresses or hostnames from showing up in your stats. Matched events stop at the ingest endpoint before storage, so they don't enter your reports, count toward usage, or trigger goals. Rules live in your account, not in the tracking script, so you can edit them anytime without touching your site.

Manage rules under Site settings → Blocklist.

IP blocklist

Every time you open your own site, that visit gets counted. If you check your site five times a day, that's 150 fake visits a month skewing your stats. The IP blocklist filters out visits from specific IP addresses so they never reach your reports.

When to use it

  • Exclude yourself or your team from production stats.
  • Skip noise during QA, after a deploy, or while debugging.
  • Drop synthetic monitoring (Pingdom, UptimeRobot, etc.) by their fixed IPs.
  • Quiet in-house bots without touching robots.txt.

How to add an IP

  1. Open Site settings → Blocklist → IP addresses.
  2. Paste one IP per line in the IP blocklist field.
  3. Save.
203.0.113.7
198.51.100.42
2001:db8::1
2001:db8:abcd:0012::0/64

IPv4 and IPv6 are both supported. Blank lines and extra whitespace are ignored.

Finding your IP

Search "what is my IP" or open api.ipify.org. Copy the address shown, paste it into the blocklist, save.

Limitations

  • IPs change. Mobile networks, residential ISPs, and VPNs rotate addresses. Best for static office or server IPs.
  • Per-site. Three sites means three separate blocklists.
  • No retroactive cleanup. Blocking an IP filters new visits only. Old visits stay in your reports.

For an alternative that works on dynamic IPs, exclude yourself in your own browser with the opt-out flag.

Opt out yourself without an IP

If your IP changes often (mobile, home Wi-Fi), set a flag in your browser instead. Open the browser console on any page and run:

localStorage.setItem('analytics_ignore', 'true')

The tracker reads this flag on every pageview and skips reporting. Per-browser, per-device, no IP needed.

The script also respects Do Not Track and Global Privacy Control automatically. If your browser sends either signal, no flag is needed — you're already excluded. See Privacy & data collection for the full list of signals the script honors.

Hostname blocklist and allowlist

Useful when the same tracking snippet runs on multiple hostnames (production, staging, preview, customer subdomains) and you want to control which ones get tracked.

Both lists live under Site settings → Blocklist → Hostnames, side by side.

Allowlist

Lists the hostnames you do want to track. Other hostnames sending the same data-id are dropped.

  • Empty allowlist: every hostname is accepted (default).
  • Non-empty allowlist: only listed hostnames are tracked, everything else is dropped.

Example: same script on example.com, www.example.com, app.example.com. Add all three. Anything else (a fork, a copy, a typo subdomain) is ignored.

example.com
www.example.com
app.example.com

Blocklist

Always blocks, regardless of allowlist state.

staging.example.com
preview.example.com
localhost

Typical case: the same script runs on production and a Vercel or Netlify preview deploy. Adding preview hostnames keeps preview traffic out of your production reports.

If a hostname appears in both lists, the blocklist wins.

How they interact

Allowed listBlocked listBehavior
EmptyEmptyTrack every hostname (default).
EmptyHas entriesTrack everything except blocked.
Has entriesEmptyTrack only allowed entries.
Has entriesHas entriesTrack allowed minus blocked.

Where filtering happens

Filtering runs on Statable's servers, before the event reaches storage. The browser still sends the request. Practical implications:

  • Your network and devtools still see the outbound call to statable.com.
  • Edits take effect on the next event. No deploy, no propagation delay.
  • Blocking is forward-only. To wipe historical events from a specific IP or hostname, contact support.

What blocking is not

  • Not a privacy or consent tool. See data collection and privacy compliance.
  • Not a way to stop traffic. Visitors still load your page.
  • Not a firewall. Real bad actors won't be deterred by a Statable rule.

Ready to take control of your web analytics? Try Statable free for 30 days — no credit card required, full feature access, GDPR-compliant by default. Start your free trial or view a live demo.