Manage requests to a path
- Control
- robots.txt allow/disallow
- Important limit
- A blocked URL can still be known or indexed without its content
Serve bot-specific robots rules from Docusaurus static assets and separate AI discovery from search crawling and page indexing.
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.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
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.Add static/robots.txt to the Docusaurus project. If the project already has a file, edit the existing rules instead of creating a duplicate.
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.
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.
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.
User-agent: OAI-SearchBot
Allow: /
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: *
Allow: /
Sitemap: https://docs.example.com/sitemap.xmlnoindex or supported response headerllms.txt or clear index pageDocusaurus’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.
/robots.txt from the canonical hostname, not only localhost or a preview domain; inspect status, content type, and exact rules.@docusaurus/plugin-sitemap ships with preset-classic by default and writes sitemap.xml after a production build (Docusaurus XML sitemap setup).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.
3 questions people ask next, answered from the sources on this page.
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.
Put the file at static/robots.txt. Docusaurus copies static assets to the production output root, where it should be served as /robots.txt.
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.
Run the free audit, then approve the fixes. Every change can be undone.