<!-- Generated from llms-txt-ghost/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- Ghost            
# llms.txt in Ghost

Ghost is a CMS, not a static host, so serving a root llms.txt takes either a built-in option or a routing workaround.

Last updated: July 26, 2026

## The Ghost constraint

Unlike a static-site generator, Ghost does not expose a folder that maps to your domain root, so
you cannot simply drop a file next to your posts. There are three realistic routes to a working
`/llms.txt`, from easiest to most manual.

## Method 1: the native toggle

Recent versions of Ghost added a built-in option to publish an AI/LLM discovery file. In
**Settings** (SEO or the meta/structured-data area, depending on version), look for an
option such as *enable structured data for LLMs and AI search engines*. When enabled,
Ghost generates and serves `/llms.txt` (and often `/llms-full.txt`)
automatically from your published content.

ℹ Auto-generated, not your file

The native output is generated by Ghost from your posts and pages, so it reflects your site
automatically but is not a file you hand-author. If you need full control over the exact
contents, use Method 2 or 3. Availability depends on your Ghost version, so check your Settings;
if the option is not there, your instance predates the feature.

## Method 2: self-hosted content/public

On a self-hosted Ghost install, files placed in `content/public/` are served from the site
root. This is the only true filesystem drop-in and gives you a hand-authored file:

```
# on your Ghost server
mkdir -p content/public
cp llms.txt content/public/llms.txt
# served at https://yourdomain.com/llms.txt (restart Ghost if needed)

```

## Method 3: routes.yaml or a redirect

On Ghost(Pro), where you cannot reach the filesystem, you have two options:

- **routes.yaml:** define a route that renders a plain-text template. Upload a modified
`routes.yaml` in **Settings, Labs**:
`routes:
/llms.txt/:
template: llms
content_type: text/plain`
then add an `llms.hbs` template to your theme containing the file body. 
- **Redirect:** host the file elsewhere (a gist, a bucket, or another static site) and
add a redirect in **Settings, Labs, Redirects** (`redirects.json`)
from
`/llms.txt` to that URL. Simplest, but the file then lives off-domain.   
## Verifying the setup

```
curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# expect: content-type: text/plain
```

On WordPress instead? See the [WordPress guide](/llms-txt-wordpress/). To get the
file contents right, use the [how-to guide](/how-to-create/) and the
[generator](/generator/).

## Sources

- [ Ghost docs, routing (routes.yaml) ](https://docs.ghost.org/themes/routing)
- [ Ghost, static file serving (content/public) ](https://docs.ghost.org/config)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)           
On this page

- [ The Ghost constraint ](#overview)
- [ Method 1: the native toggle ](#native)
- [ Method 2: self-hosted content/public ](#selfhosted)
- [ Method 3: routes.yaml or a redirect ](#routes)
- [ Verifying the setup ](#verify)
