Vercel Edge & Next.js Middleware Cloaking
Serverless traffic filtering for modern web stacks — and the intelligence layer that makes it actually work.
Vercel Edge Functions: the new funnel frontier
A huge share of modern funnels, SaaS landing pages, and affiliate front-ends now run on Vercel — usually built with Next.js. Vercel's Edge Middleware runs before every request, which makes it a tempting place to put cloaking logic: inspect the request, classify the visitor, rewrite to a safe page or let it through to the real funnel.
The typical DIY pattern
// middleware.ts
export function middleware(req) {
const country = req.geo?.country ?? '??';
const ua = req.headers.get('user-agent') ?? '';
if (BOT_UA.test(ua) || country === 'XX')
return NextResponse.rewrite('/safe-page');
return NextResponse.next();
}
Geo routing and simple UA checks are easy. But Vercel's cold-start-free edge runtime still can't tell you who is actually trustworthy — that requires live IP intelligence, fingerprint analysis, and behavioral signals that no hardcoded middleware can hold. And every ad platform's review system changes monthly, while your middleware stays exactly as you committed it.
Where Cloaker.net plugs in
🔌 Option A: Reverse proxy
Point your Vercel domain at Cloaker.net's filtering layer. No code changes; classification happens before Vercel ever sees the request.
🧩 Option B: API from middleware
Call the Cloaker.net API inside your Next.js middleware and act on the verdict — rewrite or continue, with your routing kept in code.
🎯 Option C: Cloaked link layer
Run ad traffic through a Cloaker.net link that routes to your Vercel funnel only for verified humans.
Vercel-native features that pair well
- req.geo — country/city routing out of the box.
- Edge Config — fast key-value reads for rule flags at the edge.
- ISR & rewrites — serve the safe page as a static, fast path.
- Middleware matcher patterns — scope filtering to exactly the routes that need it.
The stack is complete when Vercel handles the rendering and Cloaker.net handles the decisioning: fresh global IP intelligence, AI bot detection, and per-visit logs on top of your Next.js deployment. Media buyers running Vercel funnels through Google Ads, Meta, and TikTok consistently get the best of both worlds with Cloaker.net.
Vercel-speed funnels, Cloaker-grade filtering
Your Next.js stack deserves traffic that's actually human.
Start with Cloaker.net →