>Fafa Dev Tools

Robots.txt Generator

Generate robots.txt files for your website with allow/disallow rules for different user-agents. Free online robots.txt generator with sitemap support.

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

Sitemap: https://example.com/sitemap.xml

What is Robots.txt Generator?

robots.txt is a text file placed at the root of a website (e.g., example.com/robots.txt) that tells web crawlers which pages they can and cannot access. It uses the Robots Exclusion Protocol to define rules per user-agent (Googlebot, Bingbot, etc.). A properly configured robots.txt prevents crawlers from indexing private pages, reduces server load, and guides search engines to your sitemap.

How to Use

  1. The default rule allows all crawlers access to the site
  2. Add Allow or Disallow rules for specific paths (e.g., /admin/, /private/)
  3. Add additional user-agents to create rules specific to certain crawlers
  4. Enter your sitemap URL to help crawlers discover your pages
  5. Copy the generated content and save it as robots.txt in your website root

Examples

Basic robots.txt

InputAllow all, disallow /admin/ and /private/, sitemap: sitemap.xml
OutputUser-agent: * Allow: / Disallow: /admin/ Disallow: /private/ Sitemap: https://example.com/sitemap.xml

Block a specific crawler

InputDisallow AhrefsBot from all pages
OutputUser-agent: AhrefsBot Disallow: /

Frequently Asked Questions

Where should I place robots.txt?

At the root of your domain: https://example.com/robots.txt. It must be accessible at this exact URL. If you have subdomains, each subdomain needs its own robots.txt file.

Can robots.txt prevent indexing?

No. robots.txt tells crawlers not to crawl pages, but if a page is linked from elsewhere, search engines may still index it based on those links. For true no-indexing, use the noindex meta tag or return an X-Robots-Tag HTTP header.

What is Crawl-delay?

Crawl-delay tells supporting crawlers how many seconds to wait between requests. Googlebot does not support this directive. Bingbot and YandexBot do. Use it to reduce server load from aggressive crawlers.