---
title: "Block AI Bots Firewall Rule"
description: "Adds a rule to your Vercel Firewall that detects common AI Bots."
url: "https://vercel.com/templates/other/block-ai-bots-firewall-rule"
links:
  repository: "https://github.com/vercel/firewall-templates/tree/main/ai-bots-firewall-rule"
  demo: "https://github.com/vercel-labs/ai-bots-firewall-rule"
---

# Block AI Bots Firewall Rule

Adds a rule to your Vercel Firewall that detects common AI Bots.

A firewall rule that identifies bots known to be used in AI training based on web content.

The rule defaults to the "log action". Set to "Deny" to actually block these bots.

## Consider customization

The generated firewall rule blocks a multitude of bots used in AI training. Consider customizing the list to your need. See this [JSON file](https://github.com/ai-robots-txt/ai.robots.txt/blob/main/robots.json) for detailed descriptions of each bot.

## Attribution

This template is based on the [ai.robots.txt](https://github.com/ai-robots-txt/ai.robots.txt) project.

## Related Templates

### [RAG with Vercel AI SDK](https://vercel.com/templates/next.js/ai-sdk-rag)

A retrieval-augmented generation chatbot built with Next.js, the Vercel AI SDK, Drizzle ORM, and PostgreSQL.

### [Advanced AI Bot Protection](https://vercel.com/templates/next.js/advanced-ai-bot-protection)

An AI chat app built on Vercel that integrates Kasada's advanced bot protection. Prevent abusive API calls to the LLM before they occur.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
