robots.txt & AI Bot Control Generator
Visually configure crawl permissions for Googlebot, Bingbot, GPTBot, ClaudeBot, PerplexityBot and ByteSpider. Download the result instantly as a Next.js 15+ App Router app/robots.ts or a standard robots.txt.
Guide to robots.txt and Bot Management in the AI Era
In the past, robots.txt files were only used to guide search engine spiders such as Googlebot, Bingbot and Yandex. Today, AI companies such as OpenAI (GPTBot), Anthropic (ClaudeBot), Perplexity, Google (Google-Extended) and ByteDance (ByteSpider) constantly scrape millions of web pages, both to train large language models (LLMs) and to generate AI search answers. This tool lets you keep your site in Google's index while deciding which AI crawlers may crawl it, in Next.js 15+ app/robots.ts and standard robots.txt format.
1. Popular AI Bots: Model Training vs Live Search
Blocking every AI bot at once can stop AI search engines from citing your site as a source (AEO). What each bot does:
| User-Agent | Company / Provider | Purpose | Recommended Policy |
|---|---|---|---|
| Googlebot | Organic search indexing and SERP ranking. | Always Allow | |
| ChatGPT-User | OpenAI | Reads pages on demand and links to them as sources when a user runs a live search in ChatGPT. | Allow (Brings Traffic) |
| PerplexityBot | Perplexity AI | AI search engine index and direct answer citations. | Allow (Critical for AEO) |
| GPTBot | OpenAI | General content scraping to train future GPT models. | Optionally Block (Disallow) |
| ClaudeBot | Anthropic | Training Claude models and building datasets. | Optionally Block (Disallow) |
| Google-Extended | Training Gemini and Vertex AI models (does not affect Google Search). | Optionally Block (Disallow) | |
| Bytespider / CCBot | ByteDance / Common Crawl | General data scrapers that consume server resources very aggressively. | Block (Eases Server Load) |
2. Type-Safe app/robots.ts for the Next.js 15+ App Router
In the Next.js App Router, you can use app/robots.ts instead of a static public/robots.txt file to define dynamic rules based on the environment (development/production):
// app/robots.ts
import type { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://ismailhakkieren.com'
return {
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/admin/', '/api/', '/private/'],
},
{
userAgent: ['GPTBot', 'ClaudeBot', 'Google-Extended', 'Bytespider', 'CCBot'],
disallow: ['/'],
},
{
userAgent: ['ChatGPT-User', 'PerplexityBot'],
allow: '/',
},
],
sitemap: `${baseUrl}/sitemap.xml`,
}
}3. Standard robots.txt Configuration
A standard robots.txt template for traditional websites, placed in the root directory:
# Allow All Search Engines
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
# Block Model Training Bots (Opt-Out)
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
# Allow Live AI Search Bots
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
# Sitemap
Sitemap: https://ismailhakkieren.com/sitemap.xml