DevTools Pro · All tools · About

Robots.txt Generator

About the Robots.txt Generator

Make a robots.txt file online in a minute: this robots.txt generator writes the plain-text file that tells search engine and AI crawlers which parts of your site they may request. Start from a preset such as WordPress or Block AI crawlers, adjust user-agent groups and Allow/Disallow rules, add your sitemap URLs, then copy or download a ready-to-upload robots.txt.

Robots.txt syntax explained

A robots.txt file is made of groups. Each group starts with one User-agent: line naming a crawler (or * for all of them), followed by Disallow: and Allow: rules with URL paths. Sitemap: lines stand on their own and must use absolute URLs.

An empty Disallow: means nothing is blocked, while Disallow: / blocks the whole site. Paths are case-sensitive and match by prefix, so Disallow: /admin also blocks /admin-login and /administrator/. Google and Bing support * as a wildcard and $ to anchor the end of a URL, as in Disallow: /*.pdf$.

How crawlers pick a rule

A crawler obeys only the most specific group that matches its name. If you add a Googlebot group, Googlebot ignores everything in the * group, so repeat any shared rules there.

Within a group, Google applies the rule with the longest matching path, and Allow wins a tie. That is how the WordPress preset blocks /wp-admin/ but still allows /wp-admin/admin-ajax.php, which many themes need.

Crawl-delay asks a bot to wait a number of seconds between requests. Bing and Yandex honor it; Googlebot ignores it.

Blocking AI crawlers with robots.txt

Several AI companies publish crawler names that respect robots.txt, including GPTBot and ChatGPT-User (OpenAI), ClaudeBot and anthropic-ai (Anthropic), Google-Extended (Google AI training), PerplexityBot, CCBot (Common Crawl) and Bytespider. The Block AI crawlers preset adds a Disallow: / group for each while leaving search engines allowed.

Google-Extended is a control token, not a separate bot: blocking it opts your content out of Gemini training without affecting Google Search.

What robots.txt cannot do

Robots.txt is a public request, not access control. Anyone can read it, and badly behaved bots ignore it. Protect private content with authentication.

Blocking a URL also does not remove it from search results. Google can still index a blocked URL it finds through links, just without its content. To keep a page out of the index, allow crawling and add a noindex robots meta tag instead.

How to Use the Robots.txt Generator

  1. Pick a starting point under Presets (Allow all, Block all, WordPress or Block AI crawlers), or click Load example for a sample file.
  2. In each group set the User-agent and an optional Crawl-delay, use Add rule for Disallow or Allow lines with paths starting with /, and Add user-agent group to target another crawler. List your sitemap URLs under Sitemaps, one per line.
  3. Review the warnings under the preview, click Copy or Download, and upload the file to https://yourdomain.com/robots.txt. Clear resets the form.

Robots.txt Generator Examples

Online shop: hide admin and cart, block GPTBot

Click Load example, which creates three groups and one sitemap line.

Input:

Group 1: User-agent *
Disallow /admin/, Allow /admin/public/, Disallow /cart, Disallow /*?sort=
Group 2: User-agent GPTBot, Disallow /
Group 3: User-agent Bingbot, Disallow /search, Crawl-delay 10
Sitemaps: https://example.com/sitemap.xml

Output:

User-agent: *
Disallow: /admin/
Allow: /admin/public/
Disallow: /cart
Disallow: /*?sort=

User-agent: GPTBot
Disallow: /

User-agent: Bingbot
Disallow: /search
Crawl-delay: 10

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

WordPress site

Click the WordPress preset. The sitemap line keeps whatever is in the Sitemaps box (the default is the placeholder URL).

Input:

Preset: WordPress

Output:

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-includes/
Disallow: /?s=

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

Opt out of AI crawlers

Click the Block AI crawlers preset: search engines stay allowed, eight AI user agents are disallowed.

Input:

Preset: Block AI crawlers

Output:

User-agent: *
Disallow:

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: /

User-agent: PerplexityBot
Disallow: /

User-agent: Bytespider
Disallow: /

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

Common Errors

The warning says a path "should start with /".
Write /private/ instead of private. Crawlers match paths from the site root, so the generator warns when a rule does not begin with / or *.
The warning says a sitemap "must be an absolute URL".
Use the full address, for example https://example.com/sitemap.xml, not example.com/sitemap.xml or /sitemap.xml.
A group is missing from the output.
A group with an empty User-agent field is skipped. Enter * for all crawlers or the name of a specific bot.
Googlebot still crawls a path you disallowed under User-agent: *.
A crawler uses only the most specific group that names it. Once you add a Googlebot group, repeat the shared Disallow rules in that group too.

Frequently Asked Questions

Where does robots.txt go?
At the root of the host, for example https://example.com/robots.txt. Each subdomain and protocol needs its own file; a file in a subfolder is ignored.
Will Disallow remove a page from Google?
No. Disallow stops crawling, not indexing. Use a noindex meta tag or header on a crawlable page, or the removal tool in Search Console.
Does Googlebot respect Crawl-delay?
No. Google ignores Crawl-delay and adjusts its crawl rate automatically. Bing and Yandex do honor it.
How do I block AI crawlers but keep Google Search?
Use the Block AI crawlers preset. It disallows bots such as GPTBot, ClaudeBot, CCBot and Google-Extended and leaves User-agent: * allowed, so search crawlers are unaffected.
Is anything I enter sent to a server?
No. The file is generated in your browser and only leaves your device when you download or copy it.

Related tools