Robots.txt Generator

Generate a robots.txt file with Allow and Disallow rules for one crawler group. Add each path on a separate line and include the full sitemap URL so supporting crawlers can find it.

Workspace

robots.txt

Your result will appear here.

How to use it

  1. Use * for the shared crawler group or enter a specific product token such as Googlebot.
  2. Enter each Allow or Disallow path on its own line and use / at the beginning. Add the sitemap URL if available.
  3. Review the rules before publishing the text as /robots.txt at the root of your site.

Worked example

Input
Crawler *
Disallow /drafts/
Allow /drafts/public/
Sitemap https://example.com/sitemap.xml
Output
User-agent: *
Allow: /drafts/public/
Disallow: /drafts/

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

Frequently asked questions

Can robots.txt remove a URL from search results?

Robots.txt controls crawling. A blocked URL can still appear in search results if discovered through links. Use an accessible noindex directive to request deindexing, or authentication to protect private content.

What happens when Allow and Disallow match the same URL?

Google uses the most specific matching path. For an equally specific Allow and Disallow rule, Google uses the less restrictive rule.