AI search fix
How to add llms.txt in Docusaurus
In Docusaurus, add llms.txt as a static file so it is served from the site root at /llms.txt after build and deploy. Keep the file concise: title, summary, and links to key docs pages. Then verify it returns HTTP 200 on your production domain. Docusaurus makes static publishing straightforward, but llms.txt still depends on crawl access and content quality to be useful.
If your docs site sits behind Cloudflare, confirm AI crawlers are not challenged at the edge. A valid static file is not enough when WAF blocks requests.
Docusaurus llms.txt setup
- Create llms.txt in your static assets path for root-level output.
- Add a short summary and links to core documentation pages.
- Build and deploy; verify /llms.txt on production returns 200.
- Check robots and edge policy for trusted AI user-agents.
- Update llms.txt when docs IA or versioned routes change.
Free · 2 minutes · no card
See what AI crawlers hit on your site
Technical blockers, missing context, weak AI-readiness signals — in one HTML report.
You'll get an HTML report on llms.txt reachability and AI crawler access for your docs domain.
Frequently asked questions
Can llms.txt live under /docs/ instead of root?
Best practice is root path /llms.txt on the primary host.
Do versioned docs break llms.txt links?
They can. Use stable canonical links and review after version releases.
Does Docusaurus llms.txt guarantee assistant citations?
No. It helps orientation but does not force source selection.
Related questions
Updated
