Free Robots.txt Generator

Use this robots.txt creator to build, validate and test a robots.txt file in your browser. Manage search and AI crawler rules, add sitemap declarations, then copy or download. Nothing is sent to WebFixer servers.

  • Allow
    & Disallow rules
  • 100%
    Browser-side
  • 0
    Account required
  • Live
    Text preview

Create Your Robots.txt File

Use templates, edit user-agent groups, optionally manage AI crawlers, declare sitemaps, validate syntax, and test URLs. Everything runs in your browser. WebFixer does not receive or store your generated configuration.

Choose a Robots.txt Template

Templates populate the editor with example rules. They are starting points only. CMS sites often use different paths, so review every rule before publishing.

Templates are starting points only. Edit every rule before publishing, and confirm paths match your site.

User-agent groups

Each group lists crawlers and the paths they may or may not request.

AI crawler management (optional)

Choose only the crawlers you want to configure. Training, search discovery and user-triggered fetches are different purposes. Blocking one crawler does not block every AI service. robots.txt is a voluntary directive, not an enforcement mechanism. Before publishing, verify each crawler token and its stated purpose against the provider's official documentation, because names and policies can change.

Sitemap declarations

Optional Sitemap: lines must use absolute http(s) URLs. Build an XML sitemap with the XML Sitemap Generator if you need one.

Import existing robots.txt

Paste a file to parse it into the editor. Unsupported lines are kept under Additional directives. You will see a preview and must confirm before replacing your current configuration.

Browser fetch can fail when the remote site blocks cross-origin requests. If that happens, paste the file manually. This tool does not use a server-side proxy.

Validate Your Robots.txt File

This panel updates automatically as you edit. It checks syntax, sitemap URLs, file size, and risky patterns such as blocking the whole site. A green result means no problems were flagged in those checks. It does not prove every crawler will treat your file the same way, and it is not a live crawl of your website.

No issues

Live check: waiting for the first update.

File summary

0 User-agent groups
0 Allow rules
0 Disallow rules
0 Valid sitemaps
0 File size (bytes)

Problems and notes

Test URLs Against Your Robots.txt

Simulate whether a path would be allowed or blocked for a chosen user-agent using your current preview. This is a local rule simulator, not a live test against Google's crawlers.

Live preview

The preview always matches the current configuration. Copy or download when you are ready to upload robots.txt to your site root.

robots.txt guides crawling; it does not guarantee removal from search results and is not a substitute for access control on private content.

  • Templates& AI rules
  • Validate& test URLs
  • SitemapURLs
  • Copy /Download
Create an XML sitemap

What Is a Robots.txt File?

A robots.txt file is a plain-text crawl policy published at the site root, for example https://www.example.com/robots.txt. Well-behaved crawlers request that URL and read User-agent, Allow, Disallow and optional Sitemap lines for hints about which paths they may fetch. The file is public. It is not a login wall, not encryption, and not a reliable way to remove pages from search results.

How to Create a Robots.txt File

  1. Open the robots.txt creator above.
  2. Select a template or keep the default User-agent: * group.
  3. Add user-agent groups for crawlers that need different rules.
  4. Configure Allow and Disallow paths carefully.
  5. Add absolute Sitemap declarations if you publish XML sitemaps (create one with the XML Sitemap Generator if needed).
  6. Review the robots.txt validator panel for errors and warnings.
  7. Check important paths with the robots.txt tester.
  8. Copy or download the file as robots.txt.
  9. Upload it to the website root so it is served at /robots.txt.
  10. Confirm it returns HTTP 200 as plain text, then check the live site with the SEO Audit.

Robots.txt Examples

Allow all crawlers

User-agent: *
Disallow:

An empty Disallow usually means no path restrictions for that group. Useful on public marketing sites with nothing sensitive under crawlable URLs.

Block a particular directory

User-agent: *
Disallow: /admin/

Asks matching crawlers not to fetch paths under /admin/. Linked URLs may still be discovered; use authentication for real protection.

Block all crawling

User-agent: *
Disallow: /

This asks crawlers that use the wildcard (*) group not to fetch any path. It is appropriate for many staging or private-beta setups, and the staging template warns about the pattern. It does not automatically cover every specialised crawler. Some bots, including Google's AdsBot crawlers, do not follow the * group and need their own explicit User-agent rules if you intend to restrict them. Non-compliant bots may also ignore robots.txt entirely.

Block a particular crawler

User-agent: GPTBot
Disallow: /

User-agent: *
Disallow:

Gives GPTBot a separate policy while leaving other crawlers on the wildcard group. Blocking one named bot does not block every AI service.

Allow an exception within a blocked directory

User-agent: *
Disallow: /admin/
Allow: /admin/public/

With longest-match behaviour (as used by Google), /admin/public/ can remain allowed while other /admin/ paths stay disallowed. Use the robots.txt tester above on candidates such as /admin/, /admin/settings/ and /admin/public/.

Declare multiple sitemaps

Sitemap declarations are site-level lines. They are not part of a user-agent group and do not inherit Allow or Disallow rules from the groups above them.

Sitemap: https://www.example.com/sitemap.xml
Sitemap: https://www.example.com/sitemap-news.xml

Each Sitemap: line advertises where an XML sitemap lives. The lines do not create the sitemap files.

Robots.txt Rules Explained

  • User-agent: names the crawler group (* is the fallback group for crawlers that use it).
  • Disallow: asks matching crawlers not to fetch matching paths.
  • Allow: permits matching paths, often used as an exception inside a broader Disallow.
  • Sitemap: absolute http(s) URL of an XML sitemap. These lines are site-wide, not tied to a user-agent group.
  • Wildcards: * can match a sequence of characters in a path pattern (Google-supported).
  • End-of-URL matching: a trailing $ can anchor a pattern to the end of the path (Google-supported).

Support for directives and extensions varies. Crawl-delay and Host are not treated as Google-standard rules. The robots.txt validator on this page flags many of those as warnings rather than hard errors.

Robots.txt for AI Crawlers

Some providers publish distinct tokens for training crawls, search discovery and user-triggered fetches. Examples include GPTBot, OAI-SearchBot and ChatGPT-User (OpenAI); ClaudeBot, Claude-SearchBot and Claude-User (Anthropic); PerplexityBot and Perplexity-User; and bingbot for Bing. Always verify the current crawler tokens and their stated purposes in each provider's official documentation before you publish rules, because names and policies can change.

Google-Extended is a standalone robots.txt control relating to Google's use of crawled content for Gemini model training and certain grounding applications. It does not control Google Search crawling or rankings. Googlebot search crawling remains separate from Google-Extended.

Use the optional AI section above to add only the agents you choose. robots.txt remains voluntary: compliant bots may honour it, but it cannot guarantee that every AI system or non-compliant bot will comply. For a separate, human-readable AI resource list, see the llms.txt Generator. llms.txt does not replace robots.txt.

Common Robots.txt Mistakes

  • Accidentally publishing Disallow: / on a public site.
  • Assuming a wildcard site-wide block also covers specialised crawlers that ignore *.
  • Blocking CSS or JavaScript paths that crawlers need to render pages.
  • Blocking image directories required for understanding content.
  • Trying to use robots.txt alone to remove pages from Google's index (use noindex when indexing is the real goal).
  • Forgetting Sitemap declarations after publishing XML sitemaps.
  • Using relative Sitemap URLs instead of absolute http(s) URLs.
  • Uploading robots.txt to a subdirectory instead of the site root.
  • Assuming robots.txt keeps private data secret (the file itself is public).

How to Upload and Check Your Robots.txt File

Upload the downloaded plain-text file so it is available at https://www.example.com/robots.txt (replace with your host). Expect HTTP 200 and a text/plain (or compatible) response. Compare the live body with your generator preview. Then run WebFixer's SEO Audit on the homepage to review robots reachability, broad disallow rules, sitemap declarations and related crawl signals. You can also check DNS records with DNS Lookup if the host itself looks wrong.

Validate and Test With Care

The robots.txt validator highlights invalid directives, bad Sitemap URLs, duplicates, missing leading slashes, site-wide blocks and other risky patterns. The robots.txt tester applies longest-match rules with Allow winning equal-length ties, including * and trailing $ where supported. Example:

User-agent: *
Disallow: /admin/
Allow: /admin/public/
Disallow: /private/

Expected local simulation: /admin/ and /admin/settings/ blocked; /admin/public/ allowed; /private/ blocked; /about/ allowed by default. This remains a browser-side simulation, not a live Googlebot lab test.

The generator does not upload files, manage CDN rules or bypass CORS when fetching remote robots.txt files.

Frequently Asked Questions

What is a robots.txt file? A public plain-text file at the site root that suggests which paths crawlers may fetch.
Is this robots.txt generator free? Yes. It runs in your browser with no account required, and WebFixer does not store your draft rules.
Where should I put my robots.txt file? At the host root so it is served as /robots.txt.
Does robots.txt improve SEO? It helps you control crawling. It is not a ranking boost by itself and blocking important pages can hurt discovery.
Can robots.txt prevent Google from indexing a page? Not reliably. Disallow limits fetching; use noindex (and access controls where needed) when indexing is the concern.
How do I block a specific search engine crawler? Add a user-agent group for that crawler name and set Disallow rules for the paths you want blocked.
Should I block AI crawlers? That is a policy choice. Training, search and user-triggered agents differ, so verify tokens and purposes in each provider's official documentation. Blocking one named bot does not block every AI product.
What is the difference between Allow and Disallow? Disallow asks crawlers not to fetch matching paths; Allow can create exceptions, especially with longest-match behaviour.
Do I need a sitemap declaration in robots.txt? It is optional but useful for discovery when you publish XML sitemaps.
Can robots.txt protect private pages? No. Use authentication and server access controls. Anyone can read robots.txt.
Can I have multiple user-agent groups? Yes. Specific crawler groups and a * fallback group are common.
What happens if I don't have a robots.txt file? Many crawlers treat missing robots.txt as no crawl restrictions from that file.
How do I check whether my robots.txt file is working? Open the live URL, compare it with your preview, use the tester here, then verify with the SEO Audit.
Does Google support wildcard rules? Google documents * wildcards and trailing $ end anchors in robots.txt path patterns.
Can I edit an existing robots.txt file? Yes. Paste it into Import, parse the preview, confirm, then edit groups and re-download.

Check robots.txt on your live site

Run WebFixer’s free SEO audit to review robots.txt, sitemap discovery, and related crawl signals.