# Ghost SEO for ChatGPT, Perplexity and AI search

> Get your Ghost site into ChatGPT and AI search: the built-in llms.txt and Markdown toggle, robots.txt from your theme, code injection and sitemap.

Canonical page: https://getrankroot.com/builders/ghost · Publishing platform · checked 2026-10-19

What Ghost's own documentation says about how AI crawlers see sites built with it, and the exact settings for robots.txt, llms.txt, structured data and the sitemap.

## How Ghost delivers pages to crawlers

**Built by the server from Handlebars theme templates** (HTML without JavaScript (documented))

Ghost's theme docs say templates are made of HTML and Handlebars helpers, and in production the template files are loaded and cached by the server, so readers and crawlers get the page as HTML. Themes that pull content in with JavaScript, or a headless Ghost setup with a separate front end, can change that, so check your page source or run RankRoot's audit.

Why it matters: many AI crawlers don't run JavaScript. If your text only appears after scripts run, they may see an empty page.

## Make your content readable without JavaScript

1. Make sure your site isn't private. Ghost's setup guide says that when private site mode is on (**Settings** > **Membership** > **Access**), all search engine optimization features are switched off.
2. Ghost adds canonical tags, social cards and structured data to posts and pages on its own, so you mostly need to fill in good titles and excerpts.
3. Members-only and paid posts: Ghost's AI search feature includes only their public title and excerpt, so put what you want AI tools to quote in public posts or pages.
4. Run the [free audit](https://getrankroot.com/#scan) on your homepage and a post to confirm what crawlers get.

## robots.txt: let AI search crawlers in

1. Ghost serves a default `robots.txt` that points crawlers to your sitemap. Open `yourdomain.com/robots.txt` to see yours.
2. To change it, add your own `robots.txt` file to the root folder of your theme (next to `package.json`), zip the theme and upload the new version. Ghost's docs say a theme's `robots.txt` overrides the default.
3. Keep the `Sitemap:` line and the Disallow lines from the default file in your version, since your file replaces it completely.
4. On Ghost(Pro), uploading a custom theme needs the Creator plan or higher, according to Ghost's help center.

Rules that let AI search crawlers in (add the Disallow lines from your current file):

```
User-agent: OAI-SearchBot
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: Claude-User
Allow: /

User-agent: *
Allow: /

Sitemap: https://yourdomain.com/sitemap.xml
```

## Add llms.txt

1. Ghost has this built in. In the admin, go to **Settings** > **Meta data** and turn on the AI search (GEO) option. Ghost's changelog (July 16, 2026) says it's off by default on existing sites.
2. When it's on, Ghost publishes `llms.txt` at the root of your domain, plus `llms-full.txt`, and serves a Markdown version of any public post when you add `.md` to its URL.
3. Only public content is included. Members-only and paid posts show their public title and excerpt, and private sites don't serve these files at all.
4. Self-hosted Ghost needs a recent version for this feature. Update, then open `yourdomain.com/llms.txt` and check it with the [llms.txt validator](https://getrankroot.com/tools/llms-txt-validator).

## Add JSON-LD and head code

1. Set the site-wide title, description and search and social metadata in **Settings** > **General** (Title & description, Meta data).
2. Each post and page has its own meta title, description and social card fields in the post settings menu. Ghost falls back to the post content if you leave them blank.
3. Ghost already adds structured data to every post and page, so check your page source before adding more. To add extra JSON-LD or other tags, use **Settings** > **Code injection** > **Site header**, which Ghost places inside `<head>`, or the per-post code injection in the editor sidebar.

Example: add Organization JSON-LD in Code injection > Site header:

```
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Your brand",
  "url": "https://yourdomain.com/",
  "sameAs": ["https://www.linkedin.com/company/your-brand"]
}
</script>
```

## Sitemap

1. Ghost creates and updates an XML sitemap automatically and links it from `robots.txt`. Ghost's own example is `sitemap.xml` at the site root.
2. Submit it in Google Search Console and Bing Webmaster Tools. If you replace `robots.txt` in your theme, keep the `Sitemap:` line.

## Common mistakes

- Leaving private site mode on after launch. Ghost turns off all SEO features while it's on.
- Expecting llms.txt without turning it on. The AI search option is off by default on existing sites.
- Uploading a theme `robots.txt` that drops the default Disallow and Sitemap lines. Your file replaces Ghost's completely.
- Putting your best explainer content behind a members-only or paid wall. AI tools only get its title and excerpt.

## FAQ

### Does Ghost support llms.txt?

Yes. Turn on the AI search option in Settings > Meta data. Ghost then serves llms.txt and llms-full.txt at your domain root and Markdown versions of public posts at their URL plus .md.

### How do I edit robots.txt in Ghost?

Add a robots.txt file to the root of your theme and upload the new theme version. It overrides Ghost's default. On Ghost(Pro) custom themes need the Creator plan or higher.

### Is my Ghost site visible to ChatGPT?

Ghost themes are rendered by the server, so public content is in the HTML. Check that the site isn't private, that robots.txt allows OAI-SearchBot, and run the free audit to confirm.

### Does Ghost add structured data?

Yes. Ghost's SEO guide says it includes structured data in all posts and pages automatically, along with canonical tags and Open Graph and X card tags.

## Sources

- [Ghost changelog: Optimize your site for AI search (read 2026-10-19)](https://ghost.org/changelog/geo/)
- [Ghost help: Modifying robots.txt (read 2026-10-19)](https://ghost.org/help/modifying-robots-txt/)
- [Ghost help: SEO in Ghost (read 2026-10-19)](https://ghost.org/help/seo/)
- [Ghost help: Setting up your Ghost site (read 2026-10-19)](https://ghost.org/help/site-setup/)
- [Ghost tutorial: How to use Code Injection (read 2026-10-19)](https://ghost.org/tutorials/use-code-injection-in-ghost/)
- [Ghost developer docs: Theme structure (read 2026-10-19)](https://docs.ghost.org/themes/structure/)
- [Ghost changelog: XML sitemaps (read 2026-10-19)](https://ghost.org/changelog/xml-sitemaps/)

RankRoot is not affiliated with Ghost. Check a live site: https://getrankroot.com/ or `GET https://getrankroot.com/api/audit?url=example.com`. Other builders: https://getrankroot.com/builders.md
