A robots.txt file sits at the root of your domain and tells crawlers which URLs they may request. One wrong line can stop search engines from crawling your whole store, so this generator builds the file from a tested preset and checks it for the mistakes that cause real damage.
How to use the robots.txt generator
- Enter your site URL. It fills in the sitemap address for the preset you choose.
- Pick a preset: WordPress and WooCommerce, Shopify, static site, allow all, or block all (for a staging site).
- Edit the rule groups. Each group has a user agent (use * for all crawlers), optional crawl-delay and any number of Allow or Disallow rules. Add groups for specific crawlers such as Bingbot.
- Tick AI crawlers to block: GPTBot, ClaudeBot, CCBot, Google-Extended, PerplexityBot, Bytespider, Applebot-Extended and meta-externalagent. Select all or clear them in one click.
- Add sitemap URLs, one per line.
- Read the checks. Red items will cause damage, yellow items need a look, blue items are notes.
- Copy or download. For Shopify, the tool writes a robots.txt.liquid template instead of a plain file.
What robots.txt is and when to use it
Use robots.txt to keep crawlers away from URLs that waste their time or should never be crawled: cart, checkout and account pages, internal search results, endless filter and sort combinations, and admin areas. Do not use it to hide private content or to remove pages from Google. A healthy file for most stores is short: a few Disallow lines for low-value paths and a Sitemap line.
What a WordPress and WooCommerce file from the preset looks like:
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-login.php
Disallow: /cart/
Disallow: /checkout/
Disallow: /my-account/
Disallow: /*?add-to-cart=
Disallow: /*?orderby=
Disallow: /?s=
Disallow: /search/
Sitemap: https://example.com/wp-sitemap.xml
To find any site's robots.txt, add /robots.txt to the domain, for example example.com/robots.txt.
Platform presets
| Platform | How robots.txt works there | How to publish |
|---|---|---|
| WordPress and WooCommerce | WordPress serves a virtual robots.txt unless a real file exists in the site root | Upload the file to the root folder, or paste it into your SEO plugin's robots.txt editor |
| Shopify | Shopify generates robots.txt automatically from the robots.txt.liquid theme template | Add the generated robots.txt.liquid as a new robots template in your theme code |
| Static sites | The server returns whatever file sits at /robots.txt | Put the file in the folder your host publishes as the site root |
Editing robots.txt on Shopify
You cannot upload a robots.txt file to Shopify. Its default file already blocks paths such as /admin, /cart, /checkout and /search, and includes your sitemap. The Shopify preset writes a robots.txt.liquid template that keeps Shopify's default rules, adds your extra rules to the * group, and appends AI crawler groups and extra sitemaps. To install it, following Shopify's instructions:
- In Shopify admin, go to Online Store > Themes, open the menu on your current theme and click Edit code.
- Click Add a new template, choose robots, then Create template.
- Replace the template content with the generated code and save. Open yourstore.com/robots.txt to confirm the result.
Shopify calls this an unsupported customization that its support team cannot help with, and warns that incorrect edits can cost you traffic, so keep the default Liquid loop that the tool writes.
Blocking AI crawlers
Each ticked crawler gets its own group with Disallow: /. Know what each one does before you block it:
| User agent | Operator | What it is used for |
|---|---|---|
| GPTBot | OpenAI | Collecting content that may be used to train its models |
| ClaudeBot | Anthropic | Collecting content for model training |
| CCBot | Common Crawl | A public web archive that many AI datasets are built from |
| Google-Extended | A control token for Gemini training and grounding, not a separate crawler | |
| PerplexityBot | Perplexity | Indexing pages for Perplexity search answers |
| Bytespider | ByteDance | ByteDance's web crawler |
| Applebot-Extended | Apple | A control token for training Apple's generative models |
| meta-externalagent | Meta | Crawling for AI training and related uses |
OpenAI and Anthropic also run separate agents for search features and for pages a user asks the assistant to open (OpenAI lists OAI-SearchBot and ChatGPT-User). Blocking the training crawlers above does not block those. If you want to, add a group for each name with the Add user-agent group button, and check each company's crawler documentation for the current names.
There is a trade-off. Blocking crawlers that power AI search, such as PerplexityBot or OAI-SearchBot, can reduce how often your pages are cited in those answers, which for a store can mean fewer referrals. Also, robots.txt is voluntary: well-behaved crawlers follow it, but it cannot force a bot to stop.
Google-Extended is not Googlebot
Googlebot crawls pages for Google Search. Google-Extended is a product token that controls whether content Google has crawled can be used to train Gemini models and for grounding. Google states it does not affect inclusion in Google Search and is not a ranking signal. Blocking Google-Extended is safe for SEO. Blocking Googlebot removes you from Google Search crawling.
What robots.txt does not do
- It controls crawling, not indexing. A blocked URL can still appear in Google, without a description, if other pages link to it. Use a noindex tag or password protection instead, and do not block the page, or Google never sees the noindex.
- Google ignores crawl-delay. Some other crawlers, such as Bing, honor it.
- It is not security. The file is public, so listing a secret path only advertises it.
How crawlers read the rules
- Location: the file only works at the root of a host. A blog on a subdomain needs its own robots.txt.
- Matching: Google applies the most specific (longest) matching rule, so Allow: /wp-admin/admin-ajax.php wins over Disallow: /wp-admin/.
- Groups: a crawler follows only the most specific group that names it. If you add a Googlebot group, Googlebot ignores the * group, so repeat any rules it should follow.
- Case: paths are case-sensitive. Disallow: /Search does not block /search.
- Wildcards: * matches any characters and $ marks the end of a URL, as in Disallow: /*?add-to-cart=.
- Size: Google reads the first 500 KiB of the file and ignores anything after that.
Mistakes the checker catches
- Disallow: / under User-agent: *. This blocks every compliant crawler from your whole site. It often ships by accident when a staging file goes live.
- Disallow: / for Googlebot. Removes your site from Google Search crawling.
- Blocking CSS and JavaScript, such as /wp-content/themes/ or /assets/. Google renders pages like a browser and needs them.
- Paths that do not start with / or *. Crawlers may ignore them.
- Trying to noindex in robots.txt. Google does not support it.
- A missing or relative sitemap URL. The Sitemap URL must be absolute, including https://.
- Duplicate user-agent groups and case-sensitive paths, flagged as notes.
Who needs this
- WooCommerce store owners keeping crawlers out of cart, checkout, account and sort URLs.
- Shopify merchants who want to block AI training crawlers without breaking Shopify's defaults.
- Bloggers and niche site builders deciding which AI crawlers to allow.
- Developers who need a block-all file for staging and a clean one for launch.
Troubleshooting
- Your changes do not show at /robots.txt. On WordPress, a physical file overrides the virtual one and SEO plugins may manage it; clear any cache. On Shopify, confirm the template is named robots.txt.liquid in the templates folder.
- Search Console says a page is "Indexed, though blocked by robots.txt". Remove the block and add a noindex tag if you want the page out of Google.
- Traffic dropped after a change. Look for Disallow: / or a blocked assets folder, fix it, then use the robots.txt report in Search Console to request a recrawl.
Tip: After publishing, open yoursite.com/robots.txt in a browser to confirm the live file, then check the robots.txt report in Google Search Console.
Related tasks
Robots.txt is one part of technical SEO. Run through the Shopify SEO audit for the rest, and use the collections SEO guide before you block any filtered collection URLs. Check your live pages with the website SEO checker. If you build niche sites, the AM Jarvis AI Site Builder creates complete sites including an llms.txt file for AI tools.