robots.txt generator

This robots.txt generator creates a file with crawl rules for all crawlers and for known crawlers, including AI crawlers, along with your sitemap addresses.

The file is created in the browser, which needs JavaScript. A fixed example is shown.

Create a file
Default for all crawlers
The rules in the User-agent: * group apply to every crawler without a group of its own. Blocking adds the rule Disallow: /, and allowing adds the rule Allow: /.
One path per line, starting with a slash (/), for example /admin. The * sign stands for any run of characters, and a $ sign at the end of the path marks the end of the address. When several rules match an address, the longest rule applies.
Known crawlers A crawler with a group of its own follows the rules in that group only, and ignores the rules for all crawlers. Crawlers with the same rules share one group.
The button blocks the AI crawlers in the list, and a second press returns them to the setting for all crawlers. Google-Extended is not a separate crawler: blocking it stops the use of the content for training Google models, and does not affect how the site appears in search results.
One full address per line, for example https://example.com/sitemap.xml.
Advanced settings
Optional. The number of seconds between requests from the same crawler. Google ignores it, and some other search engines follow it.
Save the content in a file named robots.txt in the root folder of the site, so that it is available at /robots.txt.
Groups: 1. Lines in the file: 5.

Everything runs in your browser; nothing is sent or stored.

  • In the "Create a file" section, choose the default for all crawlers, and enter blocked and allowed paths, one path per line.
  • In the "Known crawlers" section, set separate rules for each crawler, or click "Block AI crawlers".
  • Enter your sitemap addresses, and copy the file content by clicking "Copy".
  • The robots.txt file is a request to crawlers, not access control. Crawlers that do not follow it can crawl any path, and anyone can read the file, so do not list secret paths in it. To keep a page out of search results, use the noindex tag, and to protect content, use a password or access permissions. A page with noindex must be open to crawling, so that the crawler sees the tag.

What is the robots.txt file?

The robots.txt file tells search engine crawlers and the crawlers of other services which paths on your site are open to crawling and which are blocked. A crawler that follows the standard reads the file before crawling and acts on its rules. The file helps focus crawling on your important pages, for example by blocking internal search results pages and filter pages, and it gives crawlers the address of your sitemap.

File structure: groups and rules

The file is divided into groups. Each group starts with one or more User-agent lines with the crawler name, followed by Disallow rules for blocked paths and Allow rules for allowed paths. A crawler follows only the group that carries its name, and when the file has no group with its name, the crawler follows the User-agent: * group. That is why a separate group for a crawler must include all the rules that apply to it, including rules that already appear in the group for all crawlers.

AI crawlers

Besides search engine crawlers, AI services also crawl websites, to collect content for training models or to add up-to-date information to their answers. Each crawler is identified by its own name, for example GPTBot from OpenAI, ClaudeBot from Anthropic, and CCBot from Common Crawl, whose dataset is used to train many models. Blocking AI crawlers does not affect Googlebot or Bingbot, so it does not hurt how your site appears in Google and Bing search results. New services add crawlers with new names, so check the documentation of these services from time to time and update the file.

Common robots.txt rules

  • Disallow: /Blocks the whole site from crawling.
  • Disallow:A rule with an empty value blocks no path.
  • Disallow: /adminBlocks every path that starts with /admin, including /admin/settings and also /administrator.
  • Disallow: /tmp/Blocks only the paths inside the /tmp/ folder. The path /tmp, without a trailing slash, stays allowed.
  • Allow: /admin/publicTogether with the rule Disallow: /admin, the path /admin/public is allowed, because the longest rule decides.
  • Disallow: /*?Blocks every address with parameters after a question mark, for example /search?q=test.
  • Disallow: /*.pdf$Blocks PDF files. The $ sign marks the end of the address, so the rule does not apply to /file.pdf?v=2.
  • Sitemap: https://example.com/sitemap.xmlThe full address of the sitemap. The directive does not belong to a specific group and applies to all crawlers.
Did you know?

On static website hosting plans, you upload the robots.txt file to your site's root folder, together with the rest of your site files.

Static website hosting plans

robots.txt generator FAQ

Where should I save the robots.txt file?

The file must be in the root folder of your site, so that it is available at the /robots.txt address of the domain, for example https://example.com/robots.txt. Crawlers do not look for the file in other folders. Each subdomain needs a file of its own, so the file of example.com does not apply to shop.example.com.

Does blocking a page in robots.txt remove it from search results?

Blocking crawling does not guarantee that the page will not appear in search results. A blocked page that other sites link to may appear in the results, usually without a description. To remove a page from search results, add the noindex tag to the page and allow the page to be crawled, so that the crawler can read the tag.

Does the Crawl-delay directive slow down all crawlers?

The Crawl-delay directive is not part of the standard, so only some crawlers follow it. Google ignores the directive, and Bing follows it. In the "Delay between requests (Crawl-delay)" field in the "Advanced settings" section, you can enter a number of seconds greater than 0, with up to 3 digits before the decimal point and up to 2 digits after it, and the directive is added to the group for all crawlers only.

Are the rules case-sensitive?

The paths in the rules are case-sensitive, so the rule Disallow: /admin does not block the path /Admin. The crawler name, on the other hand, is not case-sensitive. The generator writes a path with non-ASCII characters, such as /café, to the file in percent-encoding.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement