Cloaking on Cloudflare Workers (2026)
How to filter traffic at the CF edge — and why Cloaker.net is the production-grade way to do it.
Why the edge is where cloaking belongs
Cloaking is a latency-sensitive decision. Every visitor must be classified — human or bot — before your page loads, which means the closer the decision happens to the visitor, the better. That's why running cloaking logic on Cloudflare Workers is such a natural fit: with CF's network spanning 300+ cities, your filtering code executes within milliseconds of the user, anywhere on Earth.
The DIY Cloudflare Workers approach
Technically, you can write your own Worker that inspects the incoming request and routes accordingly:
export default {
async fetch(request, env) {
const ip = request.headers.get('cf-connecting-ip');
const ua = request.headers.get('user-agent');
// check IP lists, UA lists, geo, ASN...
if (isBot(ip, ua)) return fetch(SAFE_PAGE);
return fetch(MONEY_PAGE);
}
}
That's the easy part. The hard part is everything the snippet doesn't show: maintaining fresh databases of review-bot IPs, detecting headless browsers with spoofed User-Agents, behavioral fingerprinting, and updating everything the moment Google, Meta, or TikTok rotate their crawler ranges. A DIY Worker is frozen the day you write it. Ad platform review systems are not.
What Cloaker.net adds on top of Cloudflare
⚡ Edge-speed decisions
Cloaker.net runs its filtering across globally distributed edge infrastructure — the same principle that makes CF Workers fast, applied to traffic classification.
🧠 AI classification
Beyond static lists: behavioral fingerprinting catches bots your hand-written Worker rules will never know about.
🔄 Minute-level updates
Bot databases refreshed continuously as review infrastructure changes — no redeploying your Worker every week.
📊 Per-visit logs
Every classification is logged and explainable — something a DIY Worker gives you only if you build it yourself.
Cloudflare features cloaking complements
- cf-connecting-ip header — the real visitor IP, essential for accurate geo rules.
- Bot Fight Mode / managed challenges — a first layer, but ad review bots often pass it; you need ad-specific intelligence.
- Workers KV — great for caching your own rules, but someone still has to write the rules.
- Load balancing & custom rules — perfect for routing once the classification decision is made.
The verdict: Cloudflare Workers is a superb execution layer, but cloaking quality lives in the intelligence layer. That intelligence is exactly what Cloaker.net provides — deploy once, and its filtering keeps up with every ad platform's review systems automatically. Get started at cloaker.net.
Edge-native cloaking, zero maintenance
All the speed of edge filtering, none of the database upkeep — Cloaker.net.
Try Cloaker.net →