Free technical SEO tool

Free Robots.txt Generator & Tester

Create a custom robots.txt file for search engines and AI crawlers. Set crawl rules, add your XML sitemap, test URL permissions and download a ready-to-upload text file.

Search & AI crawler controlsLive rule testerFree · No sign-upBrowser-based processing
Step 1 · Customize crawl rules

Create robots.txt

Loading a template replaces the current form. Always review before publishing.
One Allow or Disallow directive per line. Paths must start with /. An empty Disallow allows crawling unless another rule matches.
Enter one full http(s) sitemap URL per line.
Crawler-specific preferences

Search engines & AI bots

Without a specific group, a crawler normally follows the wildcard group. Named groups do not automatically inherit wildcard rules; custom groups can copy them explicitly.

The AI shortcut makes OAI-SearchBot follow the default path rules and blocks GPTBot. It replaces any existing groups for those two tokens.

Robots.txt is not a security control or a noindex instruction. Never rely on it to hide sensitive data. Avoid blocking important pages or rendering resources.

Generated robots.txt

1 crawler group
Step 2 · Review and export
User-agent: *
Disallow:
UTF-8 · plain text
Review the generated file before publishing.

Step 3 · Test a URL

Robots.txt permission tester

Enter a token such as Googlebot, not a full HTTP user-agent string.
Tests the path and query against the generated file, not the live website.
Choose a crawler and a path to test.

Uses a Google-style longest-match model for supported directives. Individual crawlers may interpret rules differently.

How it works

How to create a robots.txt file for your website

  1. Choose a starting template or write default crawl rules.
  2. Add specific crawler groups only when you need different preferences.
  3. Enter your actual XML sitemap URLs if available.
  4. Review the file and test important public URLs with relevant crawler tokens.
  5. Download the UTF-8 file as robots.txt and publish it at your site's root, such as https://example.com/robots.txt.
  6. Verify the published file and monitor crawling in your webmaster tools.

Back up your existing robots.txt before replacing it. The generator does not upload or modify files on your website.

Rule reference

Robots.txt syntax: User-agent, Allow, Disallow and Sitemap

DirectiveExampleMeaning
User-agentUser-agent: *Default group for crawlers without a more specific matching group.
DisallowDisallow: /private/Requests that compliant crawlers skip matching paths.
AllowAllow: /private/public/Permits a more specific matching path.
Wildcard *Disallow: /*?sort=Matches a variable-length sequence of characters.
End anchor $Disallow: /*.pdf$Matches a URL path and query ending in .pdf.
SitemapSitemap: https://example.com/sitemap.xmlDeclares a sitemap location for supported crawlers.

Paths are case-sensitive. Rule order does not override the longest matching path. A named group is not automatically combined with the default group. See the Google robots.txt specification and RFC 9309.

AI search & SEO

Manage search engine and AI crawler access

Traditional search visibility and AI usage preferences are different decisions. OpenAI documents independent settings for its search and training crawlers. Google-Extended is a separate usage-control token, not a standalone HTTP crawler or a control for Google Search ranking.

TokenPurpose / context
GooglebotGoogle Search crawler
BingbotBing Search crawler
Googlebot-ImageGoogle Images crawler
Googlebot-NewsGoogle News crawler
OAI-SearchBotOpenAI search crawler
GPTBotOpenAI training crawler
Google-ExtendedGoogle AI usage control token (not a separate HTTP crawler)
Claude-SearchBotAnthropic search crawler
ClaudeBotAnthropic crawler
PerplexityBotPerplexity search crawler
ApplebotApple search crawler
Applebot-ExtendedApple AI usage control token
DuckDuckBotDuckDuckGo crawler
AhrefsBotAhrefs crawler
SemrushBotSemrush crawler

Review provider-specific documentation before changing these preferences. Allowing a search crawler does not guarantee rankings, indexation or AI citations. See OpenAI crawler documentation.

Avoid common mistakes

Robots.txt best practices for technical SEO

  • Do not accidentally publish a staging file containing Disallow: / on a production website.
  • Do not block assets that search engines need to render important pages.
  • Use authentication or appropriate access controls for private files. Use crawlable noindex directives for pages that should not appear in search results.
  • Check existing rules, especially CMS and plugin-specific exclusions, before replacing the file.
  • Do not assume every crawler supports optional directives such as Crawl-delay. This tool generates the core Allow, Disallow and Sitemap records only.
FAQ

Robots.txt generator FAQs

What is a robots.txt generator?

A robots.txt generator creates a plain-text file containing crawl preferences for automated agents. This tool lets you define Allow and Disallow rules, crawler-specific groups and sitemap URLs without writing the entire file by hand.

Where should I upload my robots.txt file?

Publish it at the root of the website origin, for example https://example.com/robots.txt. It applies to the same protocol, hostname and port. A file inside a subdirectory does not set rules for the whole website. Serve it as UTF-8 plain text.

What is the difference between Allow and Disallow?

Allow permits crawling of a matching URL path; Disallow requests that compliant crawlers avoid it. The most specific matching path takes priority under the matching model used here, and an equally specific Allow wins. Empty Disallow means no restriction.

Does robots.txt prevent indexing or protect private pages?

No. Crawl blocking is not a reliable way to remove a URL from search results, and robots.txt is public. Use authentication for private content and an appropriate noindex directive on crawlable pages when you want to prevent indexing.

Can I allow ChatGPT search while blocking AI training?

OpenAI provides separate tokens for search (OAI-SearchBot) and model training (GPTBot). You can configure them independently. This does not guarantee search inclusion or citations, and other providers have their own controls.

Can I use this tool for WordPress?

Yes. The WordPress example disallows /wp-admin/ and permits /wp-admin/admin-ajax.php. It is a starting point only; review existing plugin rules and make sure necessary scripts, styles and public pages remain crawlable.

Should I include an XML sitemap in robots.txt?

You can declare one or more absolute sitemap URLs using Sitemap directives. This helps supported crawlers discover sitemap locations. Only include real sitemap files and check their accessibility separately.

How does the robots.txt tester work?

The tester evaluates the generated rules locally using the selected crawler product token and the URL path, including its query string. It models common robots exclusion matching rules and does not contact a live website, verify actual bot behavior, test indexing or inspect HTTP responses.

Can I edit an existing robots.txt with this generator?

Use the rule editor to reproduce existing Allow, Disallow and Sitemap directives and crawler groups. Review any other records in your current file manually before replacing it; this tool does not import or preserve arbitrary directives automatically.

Is the robots.txt generator free and private?

Yes. No sign-up or paid API is required. The generator and rule tester run in your browser; the form does not send entered paths or sitemap URLs to a server.

Free robots.txt generator · Crawl rule tester · https://ihaan.org/seo-tools/robots-txt-generator.php