HomeGeneratorsDeveloper Toolsrobots.txt Generator

robots.txt Generator

Developer Tools

Generate a valid robots.txt file for your website. Control crawler access per user-agent, set allow and disallow paths, and add your sitemap URL — free.

Reviewed by the thecalcu.com team · Last updated July 14, 2026

What is a robots.txt?

Every website has the option to place a robots.txt file at its root, at the path /robots.txt, to communicate crawling preferences to search engine bots and other automated agents. The Robots Exclusion Protocol, which governs this file, is an informal but widely respected standard followed by Googlebot, Bingbot, DuckDuckBot, GPTBot, and dozens of other compliant crawlers.

A robots.txt Generator creates this file for you from a form interface, eliminating the need to hand-write the directives and check them for syntax errors. The file format is simple but unforgiving: a single misplaced space or an incorrect path prefix can accidentally block your entire website from Google, a mistake that can take weeks to reverse once search engines process the change.

The file consists of one or more rule blocks. Each block opens with a User-agent: line identifying the targeted crawler, followed by Allow: or Disallow: directives for individual paths or directories. An optional Crawl-delay: directive controls how fast a crawler may request pages. A Sitemap: directive at the end points crawlers to your XML sitemap.

Understanding what robots.txt does and does not do is critical: it controls whether a crawler visits a URL, but it does not control whether that URL appears in search results. A page can be indexed by Google without ever being crawled, if enough other sites link to it. For true de-indexing you need a noindex meta tag on the page itself.

Common legitimate uses for robots.txt include:

  • Blocking crawlers from /admin/, /checkout/, or other non-public paths that waste crawl budget
  • Preventing duplicate content from being crawled (e.g. filtered search result URLs like /products?sort=price)
  • Blocking AI training crawlers (GPTBot, Google-Extended) from proprietary content
  • Pointing all crawlers to your sitemap via the Sitemap: directive

Pair this tool with Sitemap.xml Generator to complete the two foundational technical SEO files every website needs, and use UTM Link Generator to make sure traffic that does reach your site is properly attributed in your analytics platform.

Why Use a robots.txt Generator?

Hand-writing robots.txt is error-prone because the format is stricter than it looks. Forgetting to end a path with / means the rule applies to the file rather than the directory. Using Disallow: with an empty value accidentally allows all paths (it is the correct way to allow everything, but confusingly identical in appearance to a missing value). The generator enforces correct syntax by construction, every Allow and Disallow directive is formatted from your form inputs, not typed manually.

A specific scenario: a developer adding Disallow: /wp-admin without the trailing slash will inadvertently also block /wp-admin-backup/ and any other path beginning with those characters. The correct directive is Disallow: /wp-admin/. The generator appends paths exactly as entered, so your entries should include the trailing slash for directory rules, and a review of the preview output before copying makes any issues immediately visible.

For teams managing multiple sites, a generator also speeds up workflow: spin up a new project, fill in four fields, and have a correct robots.txt ready in under a minute rather than looking up the syntax documentation again.

Who Should Use This Generator?

Website developers and technical SEOs, setting up robots.txt is a standard part of a site launch checklist. This generator produces a correctly formatted file without requiring the developer to memorise directive syntax.

WordPress and CMS site owners, many CMS platforms generate a default robots.txt that may be overly permissive or block certain paths incorrectly. Use this generator to create a custom file that matches your actual site structure.

Content publishers and bloggers, if your blog platform creates duplicate paginated URLs (e.g. /category/tech/page/2/) that you do not want crawled, a custom robots.txt with targeted Disallow rules reduces wasted crawl budget on pages that carry no new content.

AI-conscious content creators, writers and publishers who want to prevent their content from being used for AI model training can add targeted blocks for GPTBot and Google-Extended, both of which officially respect robots.txt. Use this generator to create those blocks correctly alongside the standard Googlebot rules.

E-commerce teams, product filter and sort URLs (e.g. /shoes?colour=red&size=10) generate thousands of near-duplicate pages. Blocking these paths in robots.txt reduces crawl overhead and focuses Google's crawl budget on the canonical category and product pages that actually rank.

The Privacy Policy Generator is a companion tool for site launches, along with robots.txt and a sitemap, a privacy policy is one of the baseline legal documents every website needs.

What Insights Does the robots.txt Generator Give You?

The generator produces a single output: robots.txt Content, a plain-text file ready to upload to your web server's root directory.

The output shows you exactly which directives will be applied, in the correct order: the User-agent line first, followed by Allow rules (if any), then Disallow rules, then Crawl-delay, then the Sitemap directive. Reading the output before deployment lets you verify that a Disallow rule for /admin/ does not accidentally cover a path you want accessible, and that the user-agent block applies to the right crawler.

If you are blocking a specific crawler like GPTBot, generate a second block by changing the User-agent selection and appending the rules to the same file, the generator shows you the structure for one block at a time, which you can combine manually.

How to use this robots.txt calculator

  1. Select the User Agent from the dropdown, choose All bots (*) for a global crawl rule, or select a specific crawler (Googlebot, Bingbot, GPTBot) to target just that bot.
  2. If you selected Custom, type the exact crawler name in the Custom User Agent Name field, use the crawler's official name as documented by its operator.
  3. Enter paths in the Allow Paths text area that should remain accessible even if a broader Disallow rule would otherwise block them, one path per line, starting with /.
  4. Enter paths in the Disallow Paths text area that crawlers should skip, use full directory paths ending with / for directories, or exact file paths for individual files.
  5. Optionally enter a number in Crawl Delay if you want to slow down non-Googlebot crawlers, note that Googlebot ignores this setting.
  6. Enter your sitemap URL in Sitemap URL, this should be the absolute URL to your sitemap.xml file (e.g. https://example.com/sitemap.xml).
  7. Copy the generated robots.txt Content from the output box and upload it as a file named robots.txt to the root directory of your web server (the same directory that contains your homepage's index.html).
Show formula & methodology ↓Show less ↑

Formula & Methodology

The robots.txt file follows the Robots Exclusion Protocol. The generator assembles directives in this order:

User-agent: [agent] Allow: [path]          ← zero or more, before Disallow rules Disallow: [path]       ← zero or more Crawl-delay: [n]       ← optional                        ← blank line between blocks Sitemap: [url]         ← outside any user-agent block, at end of file

Path matching rules:
- Disallow: /admin/, blocks the /admin/ directory and everything under it
- Disallow: /admin, blocks any URL starting with /admin (including /admin-panel/)
- Disallow: /*.pdf$, blocks all PDF files (supported by Google, not all crawlers)
- Allow: / with no Disallow, permits all paths (equivalent to no robots.txt for that agent)
- Disallow: /, blocks all paths for the specified agent

Example output for a typical site:

User-agent: * Allow: / Disallow: /admin/ Disallow: /checkout/ Disallow: /account/ Crawl-delay: 1  Sitemap: https://example.com/sitemap.xml

This allows all bots to crawl everything except the three protected directories, asks non-Google crawlers to wait one second between requests, and points every crawler to the sitemap.

Frequently Asked Questions

What is a robots.txt file?
A robots.txt file is a plain-text file placed at the root of a website (e.g. https://example.com/robots.txt) that instructs web crawlers which pages or directories they should or should not access. It follows the Robots Exclusion Protocol, a widely respected web standard. Crawlers from Google, Bing, and other search engines check this file before crawling your site to understand your crawling preferences.
Does robots.txt block search engines from indexing a page?
No, robots.txt controls crawler access, not indexing. Disallowing a URL in robots.txt tells the crawler not to visit that URL, but if other pages link to it, search engines may still index it without ever crawling the page content. To prevent a page from appearing in search results entirely, use a 'noindex' meta tag or X-Robots-Tag HTTP header on the page itself, not robots.txt.
What is the difference between Allow and Disallow in robots.txt?
Disallow tells the specified user-agent not to crawl the listed path or directory. Allow explicitly permits a specific path that would otherwise be blocked by a broader Disallow rule. For example, you might Disallow /images/ to block image crawling but Allow /images/logo.png to let crawlers access just the logo. Without an Allow override, the more specific Disallow rule applies.
What does User-agent: * mean?
The asterisk (*) is a wildcard that matches all crawlers, Googlebot, Bingbot, GPTBot, and any other compliant bot. A rule block starting with 'User-agent: *' applies to every crawler that reads the file. You can have multiple blocks in a single robots.txt file, each targeting a different user-agent. Googlebot-specific rules override the wildcard rules for Google's crawler.
What is Crawl-delay and when should I use it?
Crawl-delay instructs a crawler to wait a specified number of seconds between successive requests to your server. It is useful for shared hosting or resource-limited servers where aggressive crawling could cause performance issues. Note that Google officially does not respect Crawl-delay in robots.txt, use Google Search Console's crawl rate settings for Googlebot. Bingbot and some other crawlers do honour it.
Should I add my sitemap URL to robots.txt?
Yes, this is considered best practice. Adding a Sitemap directive (e.g. 'Sitemap: https://example.com/sitemap.xml') tells all crawlers where to find your XML sitemap, regardless of whether they have been submitted via Search Console or Bing Webmaster Tools. Some crawlers that are not registered in any webmaster tool will discover your sitemap solely through the robots.txt Sitemap directive.
Can I have multiple User-agent blocks in one robots.txt file?
As many as you need. You can have any number of user-agent blocks, each with its own Allow and Disallow rules. Place each block separately with a blank line between them. For example, you might allow all paths for Googlebot while blocking /ai-content/ for GPTBot to prevent AI training crawlers from accessing your proprietary content. Rules in one block do not affect another user-agent's block.
Does blocking a path in robots.txt improve website security?
It doesn't. robots.txt is a public file that any person or malicious bot can read. Disallowing a path does not make it inaccessible, it simply asks compliant crawlers not to visit it. Never rely on robots.txt to hide sensitive pages like /admin/ or API endpoints. Use proper authentication, server-level access controls, and firewalls for security. The Disallow rule is an SEO and crawl-budget tool, not a security measure.
How do I generate a robots.txt file with this tool?
Select the user-agent you want to target from the dropdown, choose 'All bots (*)' for a global rule, or pick a specific crawler like Googlebot or GPTBot. Enter your allowed and disallowed paths in the respective text areas, one path per line. Optionally add a crawl delay and your sitemap URL, then copy the generated code from the output box and upload it as robots.txt to the root directory of your website.
Can I block AI training crawlers using robots.txt?
Yes, for compliant AI crawlers. OpenAI's GPTBot, Google's Google-Extended, and Common Crawl's CCBot all respect robots.txt. Add a separate User-agent block for each crawler you want to block and set Disallow: / to block all paths. However, not all AI data-collection bots respect robots.txt, those that ignore the standard cannot be stopped this way. Major AI companies have publicly committed to honouring robots.txt restrictions.
Is my website URL or path data stored when I use this generator?
Nothing leaves your browser. The robots.txt Generator runs entirely client-side. Nothing you enter, including your site paths, crawl delay, or sitemap URL, is transmitted to any server. All processing happens locally in your browser, so you can safely use your real production URLs without any privacy concern.
Also known as
robots txt file generatorSEO crawl controlblock googlebotdisallow robotsrobots.txt builderwebsite crawler rules