Free auditStart free
GuideDocusaurus · AI crawler controls

Docusaurus AI crawlers and robots.txt

Serve bot-specific robots rules from Docusaurus static assets and separate AI discovery from search crawling and page indexing.

4 min
read
5
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

Docusaurus supports a static robots.txt asset; its docs describe no built-in AI crawler setting or llms.txt generator. Put bot-specific rules in static/robots.txt, use page metadata for noindex, and verify the production response. Robots rules do not make public docs private or guarantee AI citations.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01How it works

Add crawler rules as a static file

Docusaurus’s SEO guide says you can provide a robots file as a static asset, with static/robots.txt as its example. Docusaurus copies every file in static into the root of the generated build folder. With baseUrl: '/subpath/' the file would be served at /subpath/robots.txt, which crawlers do not read; they request /robots.txt at the host root. Docusaurus does not document a dedicated UI for choosing AI crawlers; edit the text file in version control and review the deployed response.
  1. 1

    Create the static file

    Add static/robots.txt to the Docusaurus project. If the project already has a file, edit the existing rules instead of creating a duplicate.

  2. 2

    Choose the bot policy from its operator docs

    Decide separately whether you want search, training, and user-triggered fetches. For OpenAI, OAI-SearchBot is used for ChatGPT search, GPTBot for potential training, and ChatGPT-User for user-initiated fetches. Google says Google-Extended manages whether crawled content may be used for training future Gemini models and for grounding in Gemini Apps and Grounding with Google Search on Vertex AI, and that it does not impact inclusion in Google Search.

  3. 3

    Add the exact groups

    Use each crawler’s documented robots token. A rule for one user-agent does not automatically describe every bot from the same company; add a separate group when you need a separate policy.

  4. 4

    Build and inspect the deployed file

    Run a production build, confirm robots.txt appears at the output root, then fetch https://docs.example.com/robots.txt after deployment. A CDN or hosting layer can override the static asset.

static/robots.txt example
User-agent: OAI-SearchBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: *
Allow: /
Sitemap: https://docs.example.com/sitemap.xml
02Use the control that matches the outcome

Keep crawler access separate from index controls

Need

Manage requests to a path

Control
robots.txt allow/disallow
Important limit
A blocked URL can still be known or indexed without its content
Need

Keep a public page out of Google Search

Control
Page-level robots noindex or supported response header
Important limit
Google must be able to crawl the page to read the directive
Need

Keep docs private

Control
Authentication or authorization
Important limit
robots.txt and unlisted URLs do not protect content
Need

Make docs easier for AI tools to navigate

Control
A manually maintained llms.txt or clear index page
Important limit
Docusaurus does not generate this file automatically; it does not guarantee use or citations

Docusaurus’s SEO guide warns that robots.txt does not prevent HTML pages from being indexed. For a single page, add <meta name="robots" content="noindex"> as page metadata. For the whole site, set the noIndex site config (default false), which adds <meta name="robots" content="noindex, nofollow"> to every page; the guide also mentions an X-Robots-Tag: noindex header where your host supports it (GitHub Pages does not). Docusaurus’s sitemap plugin filters pages that carry a noindex robots meta directive. Do not block a page in robots.txt if you expect Google to read its noindex.

For operator-specific behavior, read the OAI-SearchBot profile, Google-Extended profile, and robots.txt guide.

03Checklist

Audit the result after each deploy

First2
Fetch /robots.txt from the canonical hostname, not only localhost or a preview domain; inspect status, content type, and exact rules.
Confirm that the crawler token is spelled as the operator documents it and that group ordering and path rules do not unintentionally block other routes.
Next2
Check that the sitemap URL points to a real production sitemap. Docusaurus’s SEO guide says @docusaurus/plugin-sitemap ships with preset-classic by default and writes sitemap.xml after a production build (Docusaurus XML sitemap setup).
For content that should be private, test it without an authenticated session and require an access challenge. A successful public response means the content is public.
Then1
Recheck after CDN, host, or framework changes because edge rules can replace the file served from Docusaurus static output.

Bot policies do not guarantee citation, retrieval, or ranking. Keep docs pages direct, current, linked from navigation, and accessible to the intended audience. Google's robots docs and the AI crawler directory explain the limits of each control.

Sources · 5

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • docusaurus.io
  • openai.com
  • google.com
  1. 01Search engine optimization (SEO) | Docusaurusdocusaurus.io · checked 2026-10-24
  2. 02Overview of OpenAI Crawlersdevelopers.openai.com · checked 2026-10-24
  3. 03Google-Extended | Google Crawling Infrastructuredevelopers.google.com · checked 2026-10-24
  4. 04Robots.txt Introduction and Guide | Google Search Centraldevelopers.google.com · checked 2026-10-24
  5. 05Robots meta tag, data-nosnippet, and X-Robots-Tag | Google Search Centraldevelopers.google.com · checked 2026-10-24
Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01Does Docusaurus generate llms.txt?

No built-in generator is documented in Docusaurus’s SEO guide. You can publish a manually maintained file from static assets, but it does not control bot access.

02Where should Docusaurus robots.txt live?

Put the file at static/robots.txt. Docusaurus copies static assets to the production output root, where it should be served as /robots.txt.

03Can robots.txt prevent AI systems from reading a public page?

It can request that compliant crawlers avoid URLs. It does not secure the page, and it cannot guarantee that a bot follows the rule or that an AI system will not use other sources.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane