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.
Other platforms
Crafting Your llms.txt for Ghost CMS
Implementing an `llms.txt` file on a Ghost CMS requires attention to specific configurations to ensure AI models respect your directives. Unlike traditional `robots.txt` for search engine crawlers, `llms.txt` targets the distinct behavior of large language models and their training data acquisition. For Ghost, this means understanding how its routing and static file serving work. You'll specify which content sections, tags, or authors LLMs are permitted or forbidden to use. This nuanced control is vital for maintaining content integrity and protecting proprietary information when your articles are used for AI training or citation. Without it, LLMs might indiscriminately scrape your public content, potentially misrepresenting your brand or diluting your content's unique value.
Strategic Placement of llms.txt in Ghost's Structure
The strategic placement of your `llms.txt` file is paramount for its discovery and enforcement by AI agents. For Ghost CMS, this file must reside at the root of your domain, accessible via `yourdomain.com/llms.txt`. While Ghost itself doesn't have a direct 'public' folder like some other CMS platforms, you typically manage static files through themes or by integrating with a CDN. However, the `llms.txt` is a root-level document. Many Ghost users deploy static files like this directly via their hosting provider's file manager or an NGINX configuration that serves the file before the Ghost application layer. Correct placement ensures LLM crawlers find and adhere to your access rules, preventing unauthorized scraping or specific content from being indexed.
Maintaining Compliance and Versioning for AI Visibility
Maintaining your `llms.txt` file is not a one-time task; it's an ongoing commitment to effective AI visibility. As your Ghost site evolves, with new content categories, premium sections, or changes in publishing strategy, your `llms.txt` must be updated accordingly. Regular review ensures continued compliance with your content governance policies and adaptation to new LLM best practices. Version control is also highly recommended. Store your `llms.txt` in a version control system (like Git) to track changes, revert if necessary, and collaborate effectively. This proactive approach helps prevent unintended AI indexing and ensures your Ghost content contributes positively and intentionally to the AI ecosystem, protecting your brand's authoritative voice and SEO standing.
Common llms.txt Directives for Ghost Content
| Directive | Description | Ghost Application |
|---|---|---|
| User-agent: * | Applies rules to all AI models/crawlers. | Default for broad exclusion/inclusion of your Ghost site content. |
| Allow: /posts/ | Permits AI models to access content under '/posts/'. | Useful for allowing general blog post access while restricting other parts. |
| Disallow: /private-content/ | Forbids AI access to specified paths. | Crucial for Ghost membership-only content or drafts to prevent AI training. |
| Crawl-delay: 5 | Requests a delay of 5 seconds between AI requests. | Reduces server load on Ghost instances from aggressive AI scraping. |
| Cite-as: Name of Your Site | Suggests the preferred citation format for AI models. | Helps LLMs correctly attribute content sourced from your Ghost articles. |
Essential Checklist for Ghost llms.txt Deployment
- Verify llms.txt is accessible at yourdomain.com/llms.txt.
- Ensure directives align with your content licensing and AI usage policies.
- Test all `Allow` and `Disallow` paths against your Ghost URL structure.
- Include a `User-agent: *` block for broad coverage.
- Consider adding a `Crawl-delay` to protect server performance.
- Set up monitoring for 404 errors on your llms.txt file.
Step-by-Step: Deploying llms.txt on Ghost CMS
- 1Create Your llms.txt File
Using a plain text editor, draft your `llms.txt` file with specific directives (e.g., Disallow: /members/, Allow: /blog/). Ensure each directive is on a new line and follows the standard format.
- 2Access Your Hosting Environment
Log into your Ghost hosting provider's control panel or connect via SFTP/SSH. You'll need access to your site's root directory, which is the top-level folder where your Ghost installation lives.
- 3Upload to Root Directory
Place the `llms.txt` file directly into the public root folder of your domain (e.g., where index.html or your Ghost installation files are). It must be directly accessible at `yourdomain.com/llms.txt`, not within a subdirectory.
- 4Verify Public Accessibility
Open your web browser and navigate to `yourdomain.com/llms.txt`. Confirm that the content of your `llms.txt` file is displayed correctly. This verifies that LLM crawlers can discover and parse your directives, ensuring optimal AI visibility management.
More questions answered
- What is the primary purpose of llms.txt for my Ghost site?
- The primary purpose is to provide explicit instructions to large language models (LLMs) regarding how they should interact with your Ghost content. It allows you to specify which parts of your site can be used for AI training, citation, or summarization, and which parts are restricted, helping to protect proprietary information and manage content attribution effectively.
- Can I use robots.txt instead of llms.txt for AI control on Ghost?
- While `robots.txt` provides directives for traditional search engine crawlers, `llms.txt` is designed specifically for AI models. Some LLMs might respect `robots.txt`, but many modern models are being built to explicitly look for `llms.txt`. Using both ensures comprehensive control for different types of web crawlers and AI agents impacting your Ghost site's visibility.
- How often should I update my llms.txt file on Ghost?
- You should update your `llms.txt` file whenever there are significant changes to your Ghost content structure, new premium offerings, or evolving content licensing policies. A good practice is to review it quarterly or biannually to ensure it remains aligned with your content strategy and any emerging AI visibility standards or LLM behaviors.
- Will an llms.txt file guarantee that AI models won't scrape my Ghost content?
- No, an `llms.txt` file is a set of directives and not a guaranteed enforcement mechanism. It relies on the ethical adherence of AI developers and models to respect its rules. However, reputable LLM providers and AI systems are increasingly expected to honor `llms.txt` as a standard. It significantly increases the likelihood of your content being treated as intended.
Explore further
Connected guides to keep going — short reads, all internally linked.