# 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.

Canonical: https://scaplet.com/seo/docusaurus/ai-crawlers

Guide Docusaurus · AI crawler controls

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdocusaurus%2Fai-crawlers%20(%22Docusaurus%20AI%20crawlers%20and%20robots.txt%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdocusaurus%2Fai-crawlers%20(%22Docusaurus%20AI%20crawlers%20and%20robots.txt%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdocusaurus%2Fai-crawlers%20(%22Docusaurus%20AI%20crawlers%20and%20robots.txt%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdocusaurus%2Fai-crawlers%20(%22Docusaurus%20AI%20crawlers%20and%20robots.txt%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 3 parts, 4 minutes.

1. [Add crawler rules as a static file 01](#add-crawler-rules-as-a-static-file)
2. [Keep crawler access separate from index controls 02](#keep-crawler-access-separate-from-index-controls)
3. [Audit the result after each deploy 03](#audit-the-result-after-each-deploy)

_01_How 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](/ai-search/chatgpt/how-it-finds-sources), [OAI-SearchBot](/glossary/chatgpt-search) is used for [ChatGPT](/ai-search/chatgpt) search, [GPTBot](/ai-crawlers/gptbot) for potential training, and [ChatGPT-User](/ai-crawlers/chatgpt-user) for user-initiated fetches. Google says [Google-Extended](/ai-crawlers/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
```

**Set the policy you actually want**The sample allows OpenAI search crawling while disallowing training and Google-Extended use. Change it to your publishing policy; these directives are requests followed by compliant crawlers, not a technical access barrier.

_02_Use 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](/ai-crawlers/oai-searchbot), [Google-Extended profile](/ai-crawlers/google-extended), and [robots.txt guide](/glossary/robots-txt).

_03_Checklist

## Audit the result after each deploy

First_2_
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.

Next_2_
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](/seo/docusaurus/xml-sitemap)).

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.

Then_1_
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](/ai-crawlers) 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. 01 [Search engine optimization (SEO) | Docusaurus](https://docusaurus.io/docs/seo) docusaurus.io · checked 2026-10-24
2. 02 [Overview of OpenAI Crawlers](https://developers.openai.com/api/docs/bots) developers.openai.com · checked 2026-10-24
3. 03 [Google-Extended | Google Crawling Infrastructure](https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers) developers.google.com · checked 2026-10-24
4. 04 [Robots.txt Introduction and Guide | Google Search Central](https://developers.google.com/search/docs/crawling-indexing/robots/intro) developers.google.com · checked 2026-10-24
5. 05 [Robots meta tag, data-nosnippet, and X-Robots-Tag | Google Search Central](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

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

_01_ Does 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.

_02_ Where 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`.

_03_ Can 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.

## Keep learning

[All platform guides](/seo)

[Learn Mintlify AI crawlers and llms.txt Docs platforms](/seo/mintlify/ai-crawlers) [Related Google-Extended Google](/ai-crawlers/google-extended) [Read next WordPress AI crawlers CMS](/seo/wordpress/ai-crawlers) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in platform guides
[Contentful SEO](/seo/contentful) [Django custom 404 page](/seo/django/404) [Drupal SEO](/seo/drupal)

More in Docs platforms
[Docusaurus AI crawlers and robots.txt](/seo/docusaurus/ai-crawlers) [Docusaurus XML sitemap](/seo/docusaurus/xml-sitemap)

Terms on this page
[ChatGPT search](/glossary/chatgpt-search) [robots.txt](/glossary/robots-txt)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
