Robots.txt Generator with AI Crawler Blocking

Build a robots.txt from platform presets, block AI crawlers, add your sitemap and catch mistakes before you publish.

Robots.txt generator

Preset
Rules by user agent
Block AI crawlers Each one adds its own group with Disallow: /
robots.txt

  

    Publish the file at the root of your domain, for example https://example.com/robots.txt, then check it in the robots.txt report in Google Search Console.

    In short

    This robots.txt generator starts from a preset for WordPress and WooCommerce, Shopify or a static site, then lets you add allow and disallow rules, block AI crawlers such as GPTBot and ClaudeBot, and add your sitemap line. It checks for mistakes like blocking the whole site or your CSS and JavaScript, then lets you download the file.

    On this page
    1. How to use the robots.txt generator
    2. Platform presets
    3. Blocking AI crawlers
    4. What robots.txt does not do
    5. How crawlers read the rules
    6. Mistakes the checker catches
    7. Related tasks

    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

    1. Pick a preset: WordPress and WooCommerce, Shopify, or static site.
    2. Add rules. Enter any extra Allow or Disallow paths, such as a staging folder or internal search results.
    3. Toggle AI crawlers. Switch on any of GPTBot, ClaudeBot, CCBot, Google-Extended, PerplexityBot, Bytespider, Applebot-Extended and meta-externalagent to block them.
    4. Add your sitemap URL so the file includes a Sitemap line.
    5. Read the warnings. The tool flags rules that block everything or block CSS and JavaScript files.
    6. Download robots.txt and publish it at the root of your domain, for example https://example.com/robots.txt.

    Platform presets

    PlatformHow robots.txt works thereHow to publish
    WordPress and WooCommerceWordPress serves a virtual robots.txt unless a real file exists in the site rootUpload the file to the root folder, or paste it into your SEO plugin's robots.txt editor
    ShopifyShopify generates robots.txt automatically from the robots.txt.liquid theme templateAdd rules through robots.txt.liquid in your theme code
    Static sitesThe server returns whatever file sits at /robots.txtPut the file in the folder your host publishes as the site root

    A WooCommerce store usually has no reason to let crawlers spend time on cart, checkout and account pages, which is why stores commonly disallow them. Product, collection and blog pages should stay crawlable.

    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. To change it, Shopify's instructions are:

    1. In Shopify admin, go to Online Store > Themes, open the menu on your current theme and click Edit code.
    2. Click Add a new template, choose robots, then Create template.
    3. Add your extra rules (for example AI crawler blocks) while keeping Shopify's default Liquid output, and save.

    Shopify calls this an unsupported customization that its support team cannot help with, and warns that incorrect edits can cost you all your traffic. Use the generator output as the rules to add, not as a replacement for the whole template.

    Blocking AI crawlers

    Each toggle adds a User-agent group with Disallow: / for that crawler. Know what each one does before you block it:

    User agentOperatorWhat it is used for
    GPTBotOpenAICollecting content that may be used to train its models
    ClaudeBotAnthropicCollecting content for model training
    CCBotCommon CrawlA public web archive that many AI datasets are built from
    Google-ExtendedGoogleA control token for Gemini training and grounding, not a separate crawler
    PerplexityBotPerplexityIndexing pages for Perplexity search answers
    BytespiderByteDanceByteDance's web crawler
    Applebot-ExtendedAppleA control token for training Apple's generative models
    meta-externalagentMetaCrawling for AI training and related uses

    There is a trade-off. Blocking crawlers that power AI search, such as PerplexityBot, can reduce how often your pages are cited in those answers. 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 future 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. Google says robots.txt is not a way to keep a page out of search results. A blocked URL can still appear, 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. Google does not support the crawl-delay field. Some other crawlers honor it.
    • It is not security. The file is public, so listing a secret path only advertises it.

    How crawlers read the rules

    A few details decide whether your rules do what you expect:

    • 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/.
    • 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.

    An AI crawler block in the finished file looks like this:

    User-agent: GPTBot
    Disallow: /

    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.
    • Blocking CSS and JavaScript. Google renders pages like a browser. If it cannot load your theme files, it may misread your layout and mobile friendliness.
    • A missing or wrong sitemap line. The Sitemap URL must be absolute, including https://.

    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.

    Robots.txt is one part of technical SEO. Run through the Shopify SEO audit for the rest, see Shopify SEO basics for how crawling fits with titles and collections, and use the collections SEO guide before you block any filtered collection URLs. If you build niche sites, the AI Site Builder creates complete sites including an llms.txt file for AI tools.

    Frequently asked questions

    Does robots.txt stop a page from being indexed?

    No. Robots.txt controls crawling, not indexing. Google says a blocked URL can still appear in search results without a description if other pages link to it. To keep a page out of Google, use a noindex tag or password protection, and leave the page crawlable so Google can see the noindex.

    Does blocking Google-Extended hurt my Google rankings?

    No. Google-Extended only controls whether content Google crawls can be used for Gemini model training and grounding. Google states it does not affect inclusion in Google Search and is not a ranking signal. Googlebot, the Search crawler, is a separate user agent that you should not block.

    How do I edit robots.txt on Shopify?

    Shopify generates robots.txt automatically. To customize it, go to Online Store > Themes > Edit code, add a new template of type robots, and add your rules to robots.txt.liquid. Shopify Support does not help with these edits, so keep the default rules intact.

    Does Google support crawl-delay in robots.txt?

    No. Google ignores the crawl-delay field and only supports user-agent, allow, disallow and sitemap. Some other crawlers still honor crawl-delay, so it does no harm to include it for them, but it will not slow Googlebot down.

    How do I block ChatGPT and Claude from crawling my site?

    Add a User-agent group for GPTBot and one for ClaudeBot, each with Disallow: /. These are the crawlers OpenAI and Anthropic use to collect training data. Both companies run other agents for search and user-requested fetches, so check their documentation if you want to block those too.