How to add llms.txt to Ghost
Ghost serves /public files via the theme, but a route file in your theme directory is cleaner and survives theme updates better.
Before you start
- ✓Editor access to your active theme
- ✓Ghost Pro account or self-hosted Ghost instance
- ✓Optional: routes.yaml editing for the routes-based approach
Install in 3 steps
- 1
Add the file to your theme
Place llms.txt in the root of your active theme folder, then run gscan to verify.
- 2
Or use a route
Add a routes.yaml entry mapping /llms.txt to a custom template that outputs only the body content.
- 3
Verify
Fetch and confirm text/plain. Purge the Ghost cache via the admin if you don't see updates.
Troubleshooting
Pro plans restrict server-side file uploads. Use the routes.yaml approach instead.
Store the file in version control and re-upload as part of theme deploys.
Common gotchas
- • Ghost Pro plans restrict server-side file uploads — use the routes.yaml route
- • Theme updates can overwrite the file — store it in version control
Generate your llms.txt in 30 seconds
Use the free OptimAIze generator, then follow the steps above to deploy on Ghost.
Frequently asked questions
Does Ghost need both llms.txt and robots.txt?
Yes. robots.txt grants crawler permission; llms.txt curates which pages matter. Together they form the minimum AI-search setup on any Ghost site.
Will adding llms.txt slow down my site?
No. It's a tiny static text file fetched once and cached aggressively. Page-load impact is effectively zero.
How often should I update llms.txt?
Whenever your canonical content set changes — new docs section, new product line, new pricing page. A monthly review is a sensible cadence for most sites.
Can I see whether AI engines read my llms.txt?
Check your server logs for user agents like GPTBot, ClaudeBot, PerplexityBot, and Google-Extended hitting /llms.txt. Most sites see traffic within days of publishing.