Robots.txt Generator

Generate a robots.txt file for your website. Control how search engines and AI crawlers access your content.

Generated robots.txt

# robots.txt generated by LinkSpur SEO Tools

User-agent: *
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /tmp/

# Block AI crawlers
User-agent: GPTBot
Disallow: /

User-agent: ChatGPT-User
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: anthropic-ai
Disallow: /

User-agent: ClaudeBot
Disallow: /

How It Works

Configure your robots.txt rules using the checkboxes and fields below. The tool generates a valid robots.txt file with directives for search engine crawlers, including options to block AI crawlers (GPTBot, CCBot, ClaudeBot, etc.). It also validates existing robots.txt files from any URL and provides a copy-to-clipboard function for easy deployment.

Why It Matters for SEO

Robots.txt tells search engine crawlers which pages to crawl and which to skip. Proper configuration prevents crawling of admin areas, private pages, and duplicate content — saving your crawl budget for important pages. With the rise of AI training, blocking AI crawlers protects your content from being used without permission. A misplaced Disallow rule can accidentally block your entire site from Google.

When to Use This Tool

  • When setting up a new website to configure crawl permissions
  • To block AI crawlers (GPTBot, CCBot) from training on your content
  • When debugging crawl issues in Google Search Console
  • After site restructuring to update crawl directives
  • To prevent crawling of admin, login, or staging pages
  • When you need to temporarily block search engines during maintenance

Key Concepts

Robots.txt
A text file in the root directory that tells search engine crawlers which pages to crawl and which to skip. It's a suggestion, not a command.
Crawl Budget
The number of pages Googlebot will crawl on your site in a given time. Blocking unnecessary pages with robots.txt saves crawl budget for important content.
User-Agent
The crawler identifying itself when accessing your site. Different search engines use different user agents (Googlebot, Bingbot, etc.).
Sitemap Directive
A robots.txt entry pointing to your XML sitemap. Helps search engines discover your content: Sitemap: https://yoursite.com/sitemap.xml

Best Practices

  • Always include a Sitemap directive pointing to your XML sitemap
  • Block admin, login, and internal tools pages from crawling
  • Don't block CSS/JavaScript files — Google needs them to render pages properly
  • Use Allow/Disallow carefully — a Disallow: / blocks everything on your site
  • Test your robots.txt using Google Search Console's robots.txt Tester
  • Consider blocking AI crawlers (GPTBot, CCBot) if you don't want your content used for AI training

Frequently Asked Questions

Where should I place my robots.txt file?

Does robots.txt block all crawlers?

Should I block AI crawlers in robots.txt?