ranknexusSEO, AI search & ads

Free tool / Robots.txt Generator

Create a robots.txt file with AI crawler controls.

Choose which search and AI crawlers may visit your site, list any folders to keep private and add your sitemap, and the generator writes a robots.txt file you can copy or download. It checks the result the way crawlers read it (RFC 9309), so you can see each crawler's verdict before you publish.

Free, with no sign-up and no email.

Reviewed by M. NoumanCo-founder, RankNexus · Updated 19 October 2026

Search and AI answers

Blocking these keeps you out of the search results and AI answers they feed.

User-requested visits

These fetch a page when someone asks an assistant about it. Some vendors say robots.txt may not apply.

AI model training

Blocking these opts your content out of model training. Most do not affect search visibility.

yourdomain.com/robots.txt
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: meta-externalagent
User-agent: CCBot
Disallow: /

User-agent: *
Disallow:

What each crawler will do on your homepage

  • GooglebotAllowed
  • BingbotAllowed
  • OAI-SearchBotAllowed
  • Claude-SearchBotAllowed
  • PerplexityBotAllowed
  • ApplebotAllowed
  • meta-webindexerAllowed
  • ChatGPT-UserAllowed
  • Claude-UserAllowed
  • Perplexity-UserAllowed
  • GPTBotBlocked
  • ClaudeBotBlocked
  • Google-ExtendedBlocked
  • Applebot-ExtendedBlocked
  • meta-externalagentBlocked
  • CCBotBlocked

Upload the file to the root of your site, then check the live file with the Robots.txt Tester. Crawlers may take up to a day to notice changes.

The guide

How to write a robots.txt file, with templates.

Robots.txt syntax, line by line

The lines a robots.txt file can use
LineWhat it doesExample
User-agentStarts a group and names the crawler it applies to; * means every crawlerUser-agent: GPTBot
DisallowA path the crawler shouldn't fetch; left empty, nothing is blockedDisallow: /checkout/
AllowAn exception inside a blocked pathAllow: /search/help
SitemapThe full address of a sitemap, anywhere in the fileSitemap: https://www.example.com/sitemap.xml
* and $* matches any characters; $ marks the end of a pathDisallow: /*.pdf$

Paths start with a slash and are case-sensitive. Google ignores the crawl-delay line, so the generator leaves it out.

Robots.txt templates

WordPress (the rules WordPress serves by default)
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://www.example.com/wp-sitemap.xml
An online store
User-agent: *
Disallow: /cart
Disallow: /checkout
Disallow: /account
Disallow: /search

Sitemap: https://www.example.com/sitemap.xml
A staging or test site, never the live one
User-agent: *
Disallow: /

Swap in your own paths and sitemap address. On a staging site a password is safer than robots.txt, because a blocked page can still be indexed if something links to it.

Which AI crawlers to allow or block

Each crawler has its own job, so you can opt out of AI training without leaving AI search. These are the tokens the generator covers, from each company's own documentation:

Search and AI crawlers in the generator
TokenCompanyTypeWhat it controls
GooglebotGoogleSearch and AI answersGoogle Search, which AI Overviews and AI Mode draw on.
BingbotMicrosoftSearch and AI answersBing search, which Microsoft Copilot draws on.
OAI-SearchBotOpenAISearch and AI answersShowing your site in ChatGPT search answers.
Claude-SearchBotAnthropicSearch and AI answersIndexing pages for search inside Claude.
PerplexityBotPerplexitySearch and AI answersShowing and linking your site in Perplexity answers.
ApplebotAppleSearch and AI answersSearch in Spotlight, Siri and Safari.
meta-webindexerMetaSearch and AI answersMeta AI search results and the sources it cites.
ChatGPT-UserOpenAIUser-requested visitsVisiting a page when a ChatGPT user's request needs it.
Claude-UserAnthropicUser-requested visitsVisiting a page when a Claude user's question needs it.
Perplexity-UserPerplexityUser-requested visitsFetching a page a Perplexity user's question needs, so it can be cited.
GPTBotOpenAIAI model trainingContent that may be used to train OpenAI's models.
ClaudeBotAnthropicAI model trainingContent that may be used to train Anthropic's models.
Google-ExtendedGoogleAI model trainingGemini training and grounding. It does not affect Google Search.
Applebot-ExtendedAppleAI model trainingApple's model training. It does not affect Apple search results.
meta-externalagentMetaAI model trainingMeta's AI training and product indexing.
CCBotCommon CrawlAI model trainingCommon Crawl's open web archive, widely used to train AI models.

Blocking a training token such as GPTBot or Google-Extended doesn't remove you from search. Blocking a search crawler such as OAI-SearchBot or PerplexityBot keeps you out of the answers it feeds.

Where robots.txt lives, and how to edit it

  • Any site: the file sits at the root, at /robots.txt, and is served as plain text. Each subdomain needs its own.
  • WordPress: it serves a virtual robots.txt; SEO plugins let you edit it, or you can upload your own file to the site root.
  • Shopify: edit the robots.txt.liquid template in your theme. Shopify calls this an unsupported customization and warns that mistakes can lose all of your traffic.
  • Wix and similar builders: use the platform's SEO settings, since you may not be able to edit the file directly.

After any change, test the live file with the Robots.txt Tester and check the robots.txt report in Google Search Console. Crawlers may keep the old file for up to a day.

What robots.txt can't do

  • Lock anything. Reputable crawlers follow it, but some user-requested fetchers, such as ChatGPT-User and Perplexity-User, may not.
  • Remove a page from Google. Use a noindex tag and leave the page crawlable, so Google can see the tag.
  • Get you recommended. Whether AI assistants name you depends on your pages and what other sites say about you.

The AEO Checker shows whether a page is ready to be quoted, and technical SEO covers crawling and indexing beyond one file.

The short answers

What you need to know.

How do I create a robots.txt file?

Pick the crawlers to allow or block, add any folders crawlers should skip and your sitemap address, then copy or download the file. Save it as robots.txt at the root of your site, so it opens at https://yourdomain.com/robots.txt, and test the live file with our Robots.txt Tester.

What should a robots.txt file look like?

Groups of rules, each starting with one or more User-agent lines followed by Disallow or Allow lines, plus optional Sitemap lines. A simple file that allows everything is two lines: User-agent: * and an empty Disallow:.

How do I block AI crawlers without leaving AI search?

Block the training crawlers, such as GPTBot, ClaudeBot, CCBot and the Google-Extended and Applebot-Extended control tokens, and leave the search crawlers, such as OAI-SearchBot, Claude-SearchBot and PerplexityBot, allowed. The generator's “Block AI training” preset does exactly that.

Questions

Robots.txt Generator, answered.

Where do I upload robots.txt?

At the root of your domain, the same folder as your homepage. Each subdomain needs its own file. On WordPress an SEO plugin can edit it; on Shopify you edit the robots.txt.liquid theme template.

How do I edit robots.txt in WordPress?

WordPress serves a virtual robots.txt. Most SEO plugins have a file editor for it, or you can upload your own robots.txt to the site root, which replaces the virtual one.

Will blocking AI crawlers hurt my SEO?

Blocking training crawlers such as GPTBot or Google-Extended doesn't affect Google Search. Blocking Googlebot, Bingbot or the AI search crawlers keeps you out of the results and AI answers they feed.

Can robots.txt stop ChatGPT from reading my pages?

Partly. Blocking OAI-SearchBot and GPTBot stops OpenAI's automatic crawling, but OpenAI says ChatGPT-User, which fetches a page when a person asks, may not follow robots.txt.

Does robots.txt keep a page out of Google?

No. Google says a blocked page can still be indexed if other sites link to it. Use a noindex tag, and leave the page crawlable so Google can see it.

How do I create a robots.txt file?

Fill in this generator and download the file, or write the rules in a plain text file named robots.txt. Upload it to the root of your domain so it opens at yourdomain.com/robots.txt, then check it with our Robots.txt Tester.

How do I edit robots.txt in Shopify?

Shopify creates robots.txt for you. To change it, go to Online Store, open Edit code on your theme, add a new template called robots and edit the robots.txt.liquid file. Shopify warns this is an unsupported customization and that mistakes can cost all your traffic, so change as little as you need.

Is my information stored anywhere?

No. The file is built in your browser, and nothing you type is sent to us.

A useful next conversation

Want to know what AI says about your business?

The tools show what is on your site. Our free audit looks at how ChatGPT, Google and Perplexity describe you, and what we would fix first. A specialist sends a recorded walkthrough within 2 business days.

WhatsApp us