Robots.txt Generator

Generate a robots.txt file with custom rules for search engine crawlers. Free online robots.txt generator. Free, private, and runs locally in your browser.

How to use

  1. Add rules — Define user-agent, allow/disallow, and path for each rule
  2. Set sitemap — Optionally add your sitemap URL
  3. Copy output — Copy the generated robots.txt content

What Is a Robots.txt Generator?

A robots.txt generator helps you create the robots.txt file that controls how search engine crawlers interact with your website. This small but important file lives at your domain root and tells bots which URLs they're allowed to crawl and which they should skip.

Why You Need a Robots.txt File

Every website should have a robots.txt file. Without one, crawlers will attempt to access every URL on your site, which can waste crawl budget on unimportant pages like admin panels, staging environments, duplicate content, or internal search results. A well-configured robots.txt directs crawlers to your most important content.

Understanding the Syntax

  • User-agent: Specifies which crawler the rules apply to. Use * for all crawlers.
  • Disallow: Tells the crawler not to access the specified path.
  • Allow: Explicitly permits crawling of a path (useful for overriding a broader Disallow).
  • Sitemap: Points crawlers to your XML sitemap for efficient discovery of all pages.

Common Patterns

Block admin areas with Disallow: /admin/. Prevent crawling of search result pages with Disallow: /search. Block API endpoints with Disallow: /api/. Allow CSS and JS files that are needed for rendering with Allow: /assets/.

Crawl Budget Optimization

Large websites have a limited "crawl budget" — the number of pages a search engine will crawl in a given period. By blocking unimportant sections, you ensure crawlers spend their budget on pages that matter for your rankings and traffic.

Privacy

All generation happens in your browser. No data leaves your device.

Generate an XML sitemap with our Sitemap Generator. Create meta tags with the Meta Tag Generator.

Frequently asked questions

What is robots.txt?

A robots.txt file tells search engine crawlers which pages or sections of your site they can or cannot access.

Where should I place robots.txt?

It must be at the root of your domain: https://example.com/robots.txt

Does robots.txt block indexing?

No. It blocks crawling, not indexing. To prevent indexing, use a 'noindex' meta tag or X-Robots-Tag header.

What does User-agent: * mean?

The asterisk matches all crawlers. You can also target specific bots like Googlebot or Bingbot.

Related free tools

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools