What is ban evasion?
Ban evasion is when a user who has been banned, suspended, or blocked returns to a service under a new identity — by clearing cookies, opening an incognito session, registering a fresh account, or masking the connection behind a VPN, proxy, or anti-detect browser. The new session looks unrelated to the old one even though the same person, and often the same hardware, is behind it.How ShieldLabs surfaces it
ShieldLabs resolves each visit to a set of identifiers joined by the RequestID: the cookie-scoped VisitorID the evader resets at will, and the durable, server-derived DeviceID that survives the reset. A cleared cookie mints a fresh VisitorID, a VPN supplies a fresh public IP, and an incognito window looks like a first-time visitor — so none of those is a banlist key. The DeviceID is. It is computed on the server from stable device characteristics rather than read from a cookie, so the same browser hands back the same DeviceID after a cookie wipe, in incognito, and across an IP rotation. Pair it with the real network IP fromlocal_ip.ip (where public_ip.ip is the public IP a VPN rotates freely); when the two disagree detection_flags.ip_mismatch is set to true.
The DeviceID is browser-bound. A different browser on the same machine, or a wiped or materially changed device, can produce a new DeviceID, so treat device-level counts as estimates and pair the DeviceID with the local IP.
Stop a banned user from coming back
The play is one banlist lookup at the start of every session, keyed on what the returning user cannot easily change. Record the DeviceID and the real network IP at ban time, then on each visit read the incoming DeviceID andlocal_ip.ip plus the detection_flags for a quick masked-return branch. The rule your code applies: if the incoming DeviceID is on your device-level banlist, block it; if only the local IP matches, review it (a shared router or office NAT can be innocent); if neither matches but the visit is masked (ip_mismatch or anti_detect_browser), review it. The outcome: a banned user who clears cookies, opens an incognito window, or rotates a VPN still lands on the same DeviceID and gets stopped at the door, while honest visitors on shared networks only get a softer review.
Build it
Create a ShieldLabs account and get your keys
Sign up for free and get 5,000 identifications, or log in if you already have an account. Register the domain you want to identify visitors on, then open the Keys page. Use the Public Key to initialize the snippet in the browser, and keep your server-side credentials on your backend: the Private API Key authenticates the History API, and each webhook endpoint has its own
whsec_… signing secret. See Keys.Identify the session before you trust the cookie
Load the snippet and run an identification at the start of every visit, so the DeviceID and local IP are available before you read the cookie or even know which account this is. ShieldLabs POSTs one signed webhook per scored identification; verify
X-Shield-Signature on the raw body, then cache the result keyed by request_id. That handler is the shared scoreCache / waitForScore helper defined once in the Use Case Tutorials, which returns the raw webhook payload — so local_ip and detection_flags are already available to the checks below, no extra mapping needed.Record device keys at ban time
When you ban a user, persist what travels with them. The cookie and the account both reset on demand; the DeviceID and the local IP are what a returning user has to keep using.
api/ban-user.js
Check the banlist before the cookie
On every visit, look up the incoming DeviceID first. A banned DeviceID arriving under a fresh VisitorID is the tell that someone cleared storage to get back in. Block on a device match; only review on a local-IP match, since a shared office router or home NAT can be innocent.
api/session-open.js
Route the all-zero DeviceID to review
A session that runs with JavaScript disabled or blocks the snippet cannot produce stable device characteristics, so the server returns the all-zero DeviceID (
00000000-0000-0000-0000-000000000000) and scores the visit at least 90. That high score reflects a non-cooperating client, not a confirmed ban. Never auto-ban it — every blocked or JS-disabled visitor shares it, so a ban would collapse many distinct visitors onto one key and lock out a whole class of clients. Send it to manual review, weighed with the local IP and your own context. (An anti-detect browser that still runs is different: it usually produces a real, non-zero DeviceID and carries its own anti-detect weight on the score.)Feed the patterns into your banlist and tune
The per-visit lookup stops a known device at the door; the dashboard Patterns show the evasion shape over time. Export the Dangerous DeviceIDs and local IPs and feed them into your banlist as a watchlist (see below), and start in logging-only mode before you turn on hard blocks.
Test it
Confirm the key holds before you trust it. Identify a session in your browser and note the DeviceID, then clear cookies (or open an incognito window) and identify again — the VisitorID changes but the same DeviceID comes back. Repeat from behind a VPN to see the connection signals fire on the score while the DeviceID stays put. A second, different browser on the same machine can produce a new DeviceID, which is why you pair it with the local IP and treat device-level counts as estimates.Spot the evasion pattern in the dashboard
The dashboard Patterns grade each flagged entity Suspicious or Dangerous as the count crosses a threshold in a rolling window. An entity below the first threshold is the unflagged baseline, never recorded as a grade.Changing IDs on One Account
Changing IDs on One Account
One account whose VisitorID or DeviceID keeps changing, a hint of cleared storage, anti-detect tooling, or an environment cycled between visits to look new each time.
Many Accounts on One Device
Many Accounts on One Device
One device tied to many accounts, the shape of a banned user who keeps registering fresh accounts from the same machine to get back in.
Shared Local IP Across Multiple Accounts
Shared Local IP Across Multiple Accounts
Many Accounts on One Local IP
Many Accounts on One Local IP
Many accounts behind a single local network, the shape of an account farm or a banned user spinning up registrations from one place.
New Device and New Country
New Device and New Country
An existing account reappears from a new device-and-country pair, the classic post-ban re-entry where someone comes back on fresh hardware from a new location.
Reconstruct a device’s history programmatically
You can also check what a device has done from the History API. Read bydevice_id to see every session and account that machine has touched, newest first.
Read one device's history
Confirm a banned device's return
Account History reads on
account.shieldlabs.ai and webhook delivery are free; the Management History path bills 1 request per returned row (an empty result still bills 1). Lean on the per-visit banlist lookup and the pre-computed pattern export for routine enforcement, and reserve any billed Management reads for the cases you are actively confirming.Recommended starting policy
A guide, not a rule. The local IP is a soft key on purpose, since legitimate visitors share networks.| Condition | Suggested action |
|---|---|
| Incoming DeviceID on your banlist | Block, the banned device has returned |
| New device, but local IP matches a banned session | Review, could be a shared network |
| All-zero DeviceID (blocked or JS-disabled, score 90+) | Manual review, never auto-ban |
| ”Changing IDs on One Account” or “Many Accounts on One Device” (Dangerous) | Add the entity to your banlist, then review |
| Clean device, no banlist match | Allow |
Next: Stop Multi-Accounting at Signup
The companion pattern for the registration step: catch the fresh accounts a banned user opens before they get created.