FREE · No Sign-up
Free Tool · Website Management

Robots.txt Generator & Builder

Create a robots.txt file in seconds: platform presets, AI crawler blocking, sitemap, crawl-delay and a built-in URL tester.

Pick your platform, choose which crawlers to allow, and your robots.txt is written as you click. Then test any URL against it before you upload it.

Pages and folders

AI crawlers (ChatGPT, Claude, Gemini, Perplexity…)

Search engines and SEO crawlers

Sitemaps

Your robots.txt

    Test a URL against this robots.txt

    Uses Google’s matching rules: the most specific user-agent group applies, the longest matching rule wins, Allow wins a tie, and * / $ wildcards are supported. You can also paste an existing robots.txt into the output box to test it.

    How It Works

    Using Robots.txt Generator & Builder

    1

    Choose your platform

    WordPress, WooCommerce, Shopify, Magento, Joomla, Drupal, Blogger, Next.js or a custom site. Each preset fills in the folders that are safe and useful to block.

    2

    Decide who can crawl

    Block AI training bots while staying in AI search, block SEO crawlers that waste server resources, and add your own Disallow and Allow rules.

    3

    Add your sitemap

    Type your domain and the sitemap line is filled in for you. Add more sitemaps if you have several.

    4

    Check, test and download

    The checker flags mistakes such as blocking the whole site or your CSS. Test any URL, then copy the file or download robots.txt and upload it to your site’s root.

    Why Use This Tool

    What you get with Robots.txt Generator & Builder

    Presets for 10 platforms, including notes on how to edit robots.txt on Shopify, Wix and Squarespace

    One-click AI crawler recipes: block AI training (GPTBot, ClaudeBot, Google-Extended, CCBot…) but keep AI search, or block everything

    Built-in tester that follows Google’s rules: longest match wins, Allow wins ties, * and $ wildcards

    Error checks for the mistakes that hurt rankings: Disallow: / for everyone, blocked Googlebot, blocked CSS/JS, relative sitemap URLs

    Runs in your browser: nothing is uploaded, no sign-up, unlimited use

    What is a robots.txt file?

    A robots.txt file is a plain text file at the root of your website (for example https://example.com/robots.txt) that tells crawlers which parts of the site they may visit. Search engines such as Google and Bing read it before crawling, and so do the crawlers of AI companies such as OpenAI, Anthropic and Perplexity. The rules follow the Robots Exclusion Protocol, standardised in 2022 as RFC 9309.

    Robots.txt controls crawling, not indexing. A blocked page can still appear in Google if other sites link to it, just without a description. To keep a page out of search results, let Google crawl it and add a noindex meta tag instead.

    Robots.txt syntax at a glance

    DirectiveWhat it doesExample
    User-agentStarts a group of rules for one crawler, or * for allUser-agent: Googlebot
    DisallowPath the crawler should not fetch (empty = allow everything)Disallow: /admin/
    AllowException inside a blocked folderAllow: /wp-admin/admin-ajax.php
    SitemapFull URL of an XML sitemap (can appear anywhere, more than once)Sitemap: https://example.com/sitemap.xml
    Crawl-delaySeconds between requests. Honoured by Bing and Yandex, ignored by GoogleCrawl-delay: 10
    * and $Wildcards: any characters, and end of URLDisallow: /*.pdf$

    When several rules match a URL, Google uses the most specific (longest) rule; if an Allow and a Disallow rule are equally long, Allow wins. A crawler obeys only the group that matches its name most specifically, so a User-agent: Googlebot group replaces, rather than adds to, the User-agent: * rules for Googlebot. The tester above applies exactly these rules.

    Blocking AI crawlers with robots.txt

    AI companies now run separate crawlers for training models and for answering questions in AI search, so you can choose:

    CrawlerCompanyPurpose
    GPTBotOpenAIModel training
    OAI-SearchBotOpenAIChatGPT search results
    ClaudeBotAnthropicModel training
    Claude-SearchBotAnthropicClaude search answers
    Google-ExtendedGoogleUse of content for Gemini (does not affect Google Search)
    Applebot-ExtendedAppleUse of content for Apple AI training
    PerplexityBotPerplexityPerplexity answers
    CCBotCommon CrawlOpen dataset used to train many models

    A common middle ground is to block training bots but allow AI search bots, so your content isn’t used to train models but can still be cited, with a link, in AI answers. Reputable AI companies follow robots.txt, but it is a request rather than a lock, and it can’t stop scrapers that ignore it.

    Example robots.txt files

    WordPress

    User-agent: *
    Allow: /wp-admin/admin-ajax.php
    Disallow: /wp-admin/
    Disallow: /?s=
    
    Sitemap: https://example.com/wp-sitemap.xml

    Block AI training only

    User-agent: GPTBot
    User-agent: ClaudeBot
    User-agent: Google-Extended
    User-agent: CCBot
    Disallow: /
    
    User-agent: *
    Disallow:

    Common robots.txt mistakes

    • Leaving Disallow: / from a staging site. It blocks your whole site and is one of the most common causes of sudden traffic loss after a launch.
    • Blocking CSS, JavaScript or image folders. Google renders pages like a browser; if it can’t load these files it may misjudge your layout and mobile-friendliness.
    • Using robots.txt to hide pages from Google. Use noindex instead; a blocked page can’t be crawled to see the noindex tag.
    • Relative sitemap URLs. The Sitemap line must be a full URL, including https://.
    • Wrong location or name. The file must be called robots.txt (lower case) and live at the root of each host: blog.example.com needs its own.

    Where to upload robots.txt

    Upload the file to the top folder of your site so it opens at https://yourdomain.com/robots.txt. On WordPress you can also edit it in Yoast or Rank Math; on Shopify edit robots.txt.liquid in your theme; Wix has a robots.txt editor under SEO settings; Squarespace manages it for you. After uploading, open the URL in your browser and check the robots.txt report in Google Search Console.

    Next, make sure your sitemap is valid, check individual pages with the robots.txt tester, and set page-level rules with the meta robots generator.

    FAQ

    Robots.txt Generator & Builder questions

    A robots.txt generator (also called a robots.txt creator, builder or maker) writes a correctly formatted robots.txt file for you from simple choices: which folders to block, which crawlers to allow and where your sitemap is. It avoids syntax mistakes that can accidentally block your whole site.

    Choose your platform, tick the folders and crawlers you want to block, add your sitemap URL, then copy or download the result. Save it as robots.txt and upload it to the root of your website so it opens at yourdomain.com/robots.txt.

    Not strictly. Without one, crawlers assume they may crawl everything. But a robots.txt file lets you point crawlers to your sitemap, keep them out of admin, cart and search pages, and decide how AI crawlers may use your content.

    No. Robots.txt stops crawling, not indexing. A blocked URL can still be indexed from links, without a description. To remove a page, allow crawling and add a noindex meta tag, or use the Removals tool in Google Search Console.

    It depends on your goals. Blocking training bots (GPTBot, ClaudeBot, Google-Extended, CCBot) keeps your content out of future model training. Blocking AI search bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot) also removes you from AI answers and the traffic they can send. Many sites block training but allow search.

    No. Google ignores Crawl-delay and adjusts its crawl rate automatically based on how your server responds. Bing and Yandex do honour it. Only add a delay if bots are genuinely overloading your server.

    Use the tester on this page: enter a URL and pick a crawler to see whether it’s allowed and which rule decides it. You can paste an existing robots.txt into the output box to test that too. Google Search Console also shows how Google fetched your robots.txt file.

    At the root of each host, for example https://example.com/robots.txt. Subdomains such as shop.example.com need their own file, and the file name must be lower case.

    More from GrowLytics

    Free tools for your site — and for you

    More Free Tools

    Other tools you can try free