3 simple steps to prevent from Bot attacks in Vercel

Got hit by a wave of bot attacks from China this week, and I didn’t even notice it at first. :police_car_light::weary_face:

Luckily, fixed it with 3 simple steps on Vercel :backhand_index_pointing_down:

Step 1:
Go to your Vercel Dashboard → Project → Firewall → Bot Management
Turn ON both Bot Protection & AI Bot Protection.

Step 2:
Open your Vercel Logs and check which user agents/IPs are spamming your site.
You’ll often spot requests that return 429 (Too Many Requests) => those are your culprits.
Create a Custom Rule in Bot Management and DENY those User Agents/IPs.

Step 3:
Add BotID to your code → Vercel BotID Docs

After doing these, all spam traffic instantly got blocked. Bots-free site :white_check_mark:

For full screenshots and step-by-step visuals, check out my post on X.

3 Likes

Thank you so much for sharing this and helping the rest of the community :slight_smile:

2 Likes