NathanTools

Robots.txt Generator

Choose which crawlers can access your site, including AI bots, add your sitemap and test any URL before uploading your robots.txt.

100% free No sign-up Works on any device

Report a bug

Robots.txt Generator

Search engines

Blocking these removes your pages from search results.

Googlebot Google
Googlebot-Image Google Images
Bingbot Bing (also powers Copilot, DuckDuckGo results)
Applebot Apple (Siri, Spotlight)
DuckDuckBot DuckDuckGo
YandexBot Yandex
Baiduspider Baidu

AI training crawlers

Collect content to train AI models. Blocking them doesn't affect search rankings.

GPTBot OpenAI training
ClaudeBot Anthropic training
Google-Extended Google Gemini training
Applebot-Extended Apple AI training
CCBot Common Crawl
Meta-ExternalAgent Meta AI training
Bytespider ByteDance

AI search & answer bots

Fetch pages to answer questions and cite sources. Blocking them removes you from AI answers.

OAI-SearchBot ChatGPT search
ChatGPT-User ChatGPT browsing on request
Claude-SearchBot Claude search
PerplexityBot Perplexity

robots.txt


                        

    Upload the file to the root of your site so it's available at https://yoursite.com/robots.txt.

    Robots.txt tester

    Updated November 2026 · Follows RFC 9309 and Google's robots.txt rules

    How to create a robots.txt file

    1. Start from a preset: Allow all for most sites, Block AI training to opt out of AI model training, or Block all for staging sites.
    2. List any folders or pages crawlers should skip, such as /admin/, /cart or internal search results.
    3. Add your sitemap URL so every crawler can find your pages.
    4. Fine-tune individual crawlers if needed, then check any URL in the tester.
    5. Download robots.txt and upload it to the root of your site.

    Robots.txt syntax

    User-agent: *
    Disallow: /admin/
    Disallow: /*?sort=
    Allow: /admin/help.html
    
    User-agent: GPTBot
    Disallow: /
    
    Sitemap: https://example.com/sitemap.xml
    DirectiveMeaning
    User-agentWhich crawler the following rules apply to; * means any crawler without its own group
    DisallowPaths the crawler must not fetch. Disallow: / blocks everything; an empty Disallow: allows everything
    AllowAn exception inside a blocked folder
    * and $* matches any characters; $ marks the end of the URL (/*.pdf$ blocks PDFs)
    SitemapFull URL of a sitemap; can appear anywhere, any number of times
    Crawl-delaySeconds between requests; respected by Bing and Yandex, ignored by Google

    How crawlers decide which rule applies

    • One group per crawler. A crawler follows only the most specific group that names it. If Googlebot has its own group, it ignores the * group entirely, so repeat any shared rules.
    • Longest match wins. Within a group, the rule with the longest matching path decides. Allow: /admin/help.html beats Disallow: /admin/.
    • Allow wins a tie. If an Allow and a Disallow rule are equally long, Google allows the URL.
    • Paths are case-sensitive. /Admin/ and /admin/ are different paths.

    The tester above applies exactly these rules and shows which line made the decision.

    Search crawlers vs AI crawlers

    TypeExamplesIf you block them
    Search enginesGooglebot, Bingbot, ApplebotYour pages drop out of search results
    AI trainingGPTBot, ClaudeBot, Google-Extended, CCBotYour content isn't used to train future models; search rankings are unaffected
    AI search and answersOAI-SearchBot, Claude-SearchBot, PerplexityBotYou won't be cited or linked in AI answers

    Google-Extended is a control token rather than a separate crawler: blocking it stops Google using your content for Gemini training without affecting Google Search. Robots.txt is a request, not a lock; to keep private content private, use a login or server rules.

    Common robots.txt mistakes

    • Leaving Disallow: / from a staging site on the live site, which removes it from Google.
    • Blocking CSS and JavaScript. Google needs them to render the page and judge whether it's mobile-friendly.
    • Using robots.txt to hide pages from search. Use a noindex tag instead, and don't block the page, or Google can't see the tag.
    • Relative sitemap URLs. Sitemap: needs the full https:// address. Create one with the XML sitemap generator.
    • Files over 500 KiB. Google ignores everything after the first 500 KiB.

    Frequently asked questions

    A plain text file at the root of your site (yoursite.com/robots.txt) that tells crawlers which parts of the site they may visit. It follows the Robots Exclusion Protocol, standardised as RFC 9309 in 2022. Well-behaved bots such as Googlebot and Bingbot obey it; malicious bots ignore it.

    Not reliably. Blocking a page stops Google from crawling it, but Google can still index the URL, without a description, if other pages link to it. To keep a page out of search results, allow crawling and add a noindex meta tag or X-Robots-Tag header instead.

    Choose the "Block AI training" preset. It adds a Disallow: / rule for the main AI training crawlers (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Meta-ExternalAgent and Bytespider) while leaving search engines allowed. AI search bots such as OAI-SearchBot are separate, so you can still be cited in AI answers.

    Use the tester under the generator. Enter a URL or path and pick a crawler to see whether it is allowed and which rule decided it. Switch to Live site to test a published robots.txt. Google retired its own robots.txt Tester in 2023; Search Console now has a robots.txt report instead.

    No. Googlebot ignores Crawl-delay and adjusts its crawl rate automatically based on how your server responds. Bing and Yandex do respect it. If Google crawls too fast, your server can return 503 or 429 responses to slow it down temporarily.

    To the root of each host, so it opens at https://yourdomain.com/robots.txt. Subdomains (shop.yourdomain.com) and http vs https each need their own file. WordPress, Shopify and Blogger let you edit it in their settings instead of uploading a file.

    Comments

    No comments yet.

    Share this tool

    Robots.txt Generator

    Favorites

    Drag to reorder, or use the arrows. Categories and the tools inside them can both be moved.

    Saved in this browser. Sign in to keep them on every device.

    Esc
    ↑ ↓ to moveEnter to open