Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Botd is a browser library for bot detection. In this template we'll be using it alongside botd-integrations for bot detection at the edge.
Bot Detection with Botd is a Vercel example template that uses FingerprintJS's Botd library to detect bots at the edge and rewrite them to a blocked page.
Bot Detection with Botd is a Next.js boilerplate built for Vercel's Edge Middleware. It takes incoming page requests and, using Botd by FingerprintJS plus botd-integrations, classifies whether the client is a bot before serving content. When a bot is detected, the middleware rewrites the request to a bot-detected page. The template is part of Vercel's official examples collection and includes a live demo at https://edge-functions-bot-protection-botd.vercel.app.
Next.js developers who need a working reference for implementing edge bot detection will find this template directly applicable. Site owners protecting forms, logins, or APIs from scrapers can use it as a starting point to block automated traffic. Teams evaluating bot detection services can compare Botd's free beta approach against alternatives like DataDome.
Deploy with one click on Vercel or clone the repo locally. Obtain a free Botd API token from the Botd repository and set it as NEXT_PUBLIC_BOTD_API_TOKEN. After copying the environment file and running pnpm dev, the middleware rewrites requests labeled as bots to the bot-detected page.
Botd is free during its beta period; you only need to request a token from the Botd GitHub repository. The Vercel example itself has no additional cost.
No. Botd is a browser library focused purely on bot detection, whereas FingerprintJS also offers device fingerprinting for user identification. The template integrates only Botd.
You need a free Botd API token, a local Node.js environment with pnpm, and optionally a Vercel account for deployment. The token is set in the NEXT_PUBLIC_BOTD_API_TOKEN environment variable.
The live demo at https://edge-functions-bot-protection-botd.vercel.app has a /blocked route that is rewritten to a bot-detected page when the edge middleware classifies the visitor as a bot.
Yes, it runs locally with pnpm dev. Edge Middleware is a Vercel concept, but you can still test the Next.js app locally; the middleware will execute in the development server.
