Free Robots.txt Generator

Enter your website and we'll load your current robots.txt, find private areas that should stay out of search, and build a verified file that keeps you visible in AI search. Free, with no sign-up.

No website yet? Start from our recommended settings instead.

Reading your robots.txt, sitemap and private areas. This usually takes 5 to 15 seconds…

Settings

Start from a preset, then adjust individual crawlers.

Your robots.txt

Upload this file to the root of your website, so it is available at yourdomain.com/robots.txt.

What is robots.txt?

robots.txt is a plain text file at the root of your website (yoursite.com/robots.txt) that tells crawlers which parts of the site they may visit. Search engines and AI crawlers read it before they crawl. It's a request, not a lock: well-behaved crawlers follow it, but it doesn't hide or protect anything.

In the age of AI search, robots.txt does two jobs at once. It keeps private areas like your admin, cart and checkout out of search, and it decides which AI crawlers can read your public pages. One wrong line can quietly remove you from ChatGPT, Claude or Perplexity answers.

Mind map: how robots.txt worksrobots.txt. Directives: User-agent, Disallow and Allow, Sitemap, * and $ wildcards, Crawl-delay (Google ignores); Crawler groups: Search engines, AI search and assistants, AI training; Precedence rules: Own group beats *, Longest match wins, Allow wins a tie; Common mistakes: Disallow: / by accident, Blocked CSS or JavaScript, Field-name typos, Using it to hide pages.DirectivesUser-agentDisallow and AllowSitemap* and $ wildcardsCrawl-delay (Google ignores)Precedence rulesOwn group beats *Longest match winsAllow wins a tieCrawler groupsSearch enginesAI search and assistantsAI trainingCommon mistakesDisallow: / by accidentBlocked CSS or JavaScriptField-name typosUsing it to hide pagesrobots.txt
robots.txt in one picture: the lines it uses, the crawlers it controls, how conflicts resolve, and the mistakes to avoid.

How this robots.txt generator works

1. It reads your current file

Already have a file? This works as a free robots.txt checker and tester too. We load your existing robots.txt, check which search engines and AI crawlers it allows, and keep your rules for any other crawlers, so nothing you rely on is lost. We also flag lines that search engines silently ignore, such as a misspelled field name or a rule placed before any User-agent line.

2. It looks for private areas and subdomains

We check your site for common private sections, including admin areas, dashboards, account pages, carts, checkouts, internal search and API paths, and select the ones that actually exist so they stay out of search. Sign-up and registration pages are never selected for you, because many sites want those found. We also check common subdomains like app, dashboard and staging, which need their own robots.txt, and we recognize wildcard DNS so we don't invent subdomains that aren't real.

3. It verifies the result before you copy it

We test the generated file with the same matching rules search engines use: every crawler you allowed can reach your site, every crawler you blocked can't, your private sections are closed to all crawlers, and none of the public pages in your sitemap are blocked by mistake. We also flag blocked CSS or JavaScript files, and add your sitemap if the file doesn't list one.

Robots.txt syntax, in plain words

Robots.txt directives and what they do
LineWhat it doesExample
User-agentStarts a group of rules for one crawler, or for all crawlers with *User-agent: GPTBot
DisallowAsks the crawler not to visit paths that start with this value. Disallow: / blocks the whole siteDisallow: /checkout
AllowMakes an exception inside a disallowed pathAllow: /blog/
SitemapPoints crawlers to your sitemap. Applies to every crawlerSitemap: https://www.example.com/sitemap.xml
* and $* matches any characters, $ marks the end of a URLDisallow: /*.pdf$
Crawl-delayAsks for a pause between requests. Google ignores it; some other crawlers read itCrawl-delay: 10

Three rules decide what happens when lines conflict. A crawler with its own group follows only that group and ignores the * group. Within a group, the longest matching rule wins. If an Allow and a Disallow rule are the same length, Allow wins. These are the rules in RFC 9309 and Google's documentation, and they're the rules this generator verifies against.

Example: a robots.txt that stays visible in AI search

This example keeps private areas out of search, lets search engines and AI search crawlers in, and opts out of AI training. Blocking training is a business choice; the Recommended preset does the same.

# Search engines and AI search crawlers: allowed everywhere public
User-agent: *
Disallow: /admin/
Disallow: /account
Disallow: /cart
Disallow: /checkout

# AI training crawlers: opted out
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: CCBot
Disallow: /

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

Notice the training crawlers have their own group, so they follow only Disallow: /. OAI-SearchBot, ChatGPT-User, PerplexityBot and the others aren't named, so they follow the * group and can read every public page.

AI crawlers explained

Search, AI search and AI training crawlers
GroupCrawlersIf you block them
Search enginesGooglebot, BingbotYou leave search and most AI answers, since Google AI Overviews, ChatGPT search and Copilot draw on these indexes
AI search and assistantsOAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User, DuckAssistBot, ApplebotYour pages can't appear or be cited in AI answers
AI trainingGPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Meta-ExternalAgent, Bytespider, AmazonbotModels stop training on your content. On its own, this doesn't remove you from AI search

Common robots.txt mistakes

  • Blocking everything by accident: User-agent: * with Disallow: / often ships from a staging site and blocks every crawler.
  • Blocking CSS or JavaScript: search engines need them to render your pages properly.
  • Typos: a misspelled field like Dissallow is silently ignored.
  • Using robots.txt to hide pages: it's public and only a request. Use a login, or a noindex tag.
  • Disallowing a page you want removed from Google: if crawlers can't visit it, they can't see its noindex tag.
  • Forgetting subdomains: app.yoursite.com and staging.yoursite.com each need their own robots.txt.

Test it after you upload

Use this page as a robots.txt tester: once the new file is live, analyze your site again and confirm every setting matches. Then run the free AI Visibility Checker to confirm all 18 crawlers see the access you intended, and check Google's view in the robots.txt report in Google Search Console. Remember that a firewall can still block AI crawlers that robots.txt allows. Our guide How to Check Your AI Visibility shows the one-line test.

Want robots.txt checked on every change?

Owl-gorithm Hacker audits your robots rules, meta robots and headers for conflicts across your whole site, and Game Plan Owl ranks each fix by impact.

Get started free

Frequently asked questions

Where do I upload robots.txt?

At the root of your domain, so it loads at yourdomain.com/robots.txt. Crawlers only look there. A robots.txt in a subfolder is ignored, and each subdomain needs its own file.

Will my existing rules be lost?

No. When you analyze your website we load your current robots.txt, match the settings to it, and keep your rules for any other crawlers. The Changes panel shows exactly what will be different before you copy the new file.

Which settings do you recommend?

For most businesses: allow search engines and AI search crawlers so you can appear in AI answers, keep private areas such as admin, account and checkout pages out of search, and decide separately about AI training crawlers. The Recommended preset blocks training only.

Will blocking GPTBot remove me from ChatGPT?

No. GPTBot is used for training. ChatGPT search uses OAI-SearchBot, and pages requested during a chat are fetched by ChatGPT-User. Blocking GPTBot alone doesn't remove you from ChatGPT search results.

Is robots.txt enough to keep private pages private?

No. robots.txt only asks well-behaved crawlers to stay away. Anyone can still open those pages, and the file itself is public. Keep private areas behind a login, and use a noindex tag on pages that must never appear in search.

Does Google support Crawl-delay?

No. Google ignores the Crawl-delay line. Some other crawlers, such as Bingbot, read it. If Google is crawling too fast, the fix is on the server side, not in robots.txt.

Should I block CSS and JavaScript files?

No. Search engines render your pages with your CSS and JavaScript. Blocking them can make pages look broken to Google. The generator flags this if your current file does it.

What do you do with my website?

When you analyze a site we read its public robots.txt, its sitemap and a few common addresses, such as /admin and /checkout, to see which exist. Nothing is stored. Editing and verifying the file happens in your browser.