SEO for Ghost

Ghost Sitemap and Robots.txt: What's Auto-Generated and What You Can Override

Ghost ships /sitemap.xml automatically. Here's what's in it, what's missing, and how to add custom robots rules.

Published May 24, 20267 min readBy RankCrab Team

Ghost generates a sitemap and a robots.txt file automatically. Most platforms require a plugin for this. Ghost doesn't. For the majority of sites, the defaults are good enough to submit to Google Search Console and move on.

But "good enough by default" still has gaps. The auto-generated sitemap includes tag pages you may not want indexed. The robots.txt allows all crawlers with no exceptions. And there's no built-in way to add custom rules without editing configuration files.

Here's exactly what Ghost generates, where it falls short, and how to override it.

The Ghost sitemap structure

Ghost's sitemap lives at /sitemap.xml. It's a sitemap index — a master file that lists four child sitemaps rather than listing URLs directly.

/sitemap-posts.xml — All published posts with visibility: public. Members-only and paid-tier posts are excluded. Each entry includes the full URL and the lastmod date, which pulls from post.updated_at automatically. You don't need to trigger a sitemap update when you edit a post — Ghost updates the lastmod timestamp immediately.

/sitemap-pages.xml — All published static pages (Pages, not Posts, in Ghost's content model). Same visibility rules apply.

/sitemap-tags.xml — All public tags. This is the problematic one. Every tag that isn't prefixed with # (internal tags) gets an entry here, including organizational tags you created for internal use. A tag archive page with three posts and no description appears in the sitemap as an indexable URL, and Google may crawl and index it.

/sitemap-authors.xml — All staff users (authors). Each author has an archive page at /author/{slug}/ that's included here. For single-author sites, this is a thin duplicate of your content archive. For multi-author publications, it can be genuinely useful.

What the sitemap gets right

Ghost's sitemap implementation handles several things correctly out of the box:

  • Automatic lastmod dates. post.updated_at is a server-side timestamp that updates whenever you save changes. The sitemap reflects this without any action on your part. Google can tell when your content was last updated.
  • Split by content type. The index sitemap + four child sitemaps keeps individual files manageable as your site grows. A single sitemap file caps at 50,000 URLs; Ghost's split approach pushes that limit far out.
  • No plugin required. This is worth emphasizing because WordPress's equivalent requires Yoast, RankMath, or another plugin. Ghost ships it natively.
  • Member-only content excluded. Posts behind a membership wall don't appear in the sitemap. Ghost correctly omits content that Googlebot can't access.

What the sitemap doesn't handle

Tag pages without descriptions. Ghost includes all public tag archive pages in sitemap-tags.xml regardless of whether they have any meaningful content. A tag named misc with 2 posts and no description gets the same sitemap treatment as a rich topic hub with 30 posts and a 300-word introduction. Google has to crawl and evaluate them to tell the difference.

No priority or changefreq. Ghost's sitemap doesn't include <priority> or <changefreq> tags. These fields have been largely deprecated by Google (they were rarely honored), so this isn't a real problem — but it means you can't signal crawl prioritization through the sitemap.

Email-only posts don't appear. This is correct behavior, not a gap — email-only posts have no URL. But it's a common source of confusion when publishers expect their newsletter content to show up in Search Console.

Custom routes from routes.yaml. If you've defined custom URL structures using Ghost's routes.yaml configuration, those URLs may not appear in the auto-generated sitemap. Custom routes that serve dynamic content collections need custom sitemap handling.

Checking your sitemap

Before submitting to Google Search Console, inspect each child sitemap directly:

yourdomain.com/sitemap.xml
yourdomain.com/sitemap-posts.xml
yourdomain.com/sitemap-pages.xml
yourdomain.com/sitemap-tags.xml
yourdomain.com/sitemap-authors.xml

Look for:

  • Tag pages you don't want indexed (common problem)
  • Author pages that are thin or redundant (single-author sites)
  • Any URLs that return non-200 status codes
  • Missing posts that should be public
Free tool
XML sitemap generator
Paste URLs, get a valid sitemap.xml you can copy or download.
Try it

Ghost's default robots.txt

Ghost's default robots.txt is permissive:

User-agent: *
Disallow: /ghost/
Sitemap: https://yourdomain.com/sitemap.xml

It blocks the /ghost/ admin path (which would return a 401 anyway) and declares the sitemap location. Everything else is open to all crawlers.

This is a reasonable default for most sites. But there are situations where you want to add rules:

  • Block specific tag archives — if you have organizational tag pages you haven't converted to internal tags
  • Block author archive pages — common on single-author sites where /author/your-name/ is thin content that duplicates your post archive
  • Block search results pages — if your Ghost theme includes an internal search feature that generates /?s=query URLs
  • Block specific URL patterns — UTM parameter pages, pagination variations, or other URL structures you don't want indexed

Overriding robots.txt in Ghost

Ghost doesn't provide a UI field for editing robots.txt. The override happens through routes.yaml — Ghost's routing configuration file.

On Ghost(Pro), you access routes.yaml in Settings → Labs → Routes → Upload routes.yaml (or download the current file to edit it).

On self-hosted Ghost, the file is at content/settings/routes.yaml.

To add custom robots.txt rules, you need to redirect the robots.txt URL to a static file or use a custom route that serves your robots content. The cleanest approach on self-hosted Ghost is to use a web server (nginx or Caddy) to serve a custom robots.txt before the request reaches Ghost:

Nginx example:

location = /robots.txt {
    add_header Content-Type text/plain;
    return 200 "User-agent: *\nDisallow: /ghost/\nDisallow: /tag/misc/\nDisallow: /tag/internal/\nDisallow: /author/\nSitemap: https://yourdomain.com/sitemap.xml\n";
}

Ghost(Pro) — using Code Injection workaround:

Ghost(Pro) doesn't give you nginx access. The available workarounds are:

  1. Convert organizational tags to internal tags (prefix with #) to remove them from the sitemap and eliminate the need to disallow them
  2. Noindex specific pages via Code Injection (the <meta name="robots"> approach) rather than robots.txt
  3. Use a Cloudflare Worker or similar edge layer to intercept /robots.txt requests

The <meta name="robots" content="noindex"> approach via Code Injection is more reliable for Ghost(Pro) users than trying to modify robots.txt, because it works at the page level rather than requiring server configuration.

Free tool
Robots.txt generator + tester
Build robots.txt with a form, test any URL against it offline.
Try it

The tag and author indexing gotcha

The most common robots/sitemap issue on Ghost sites that have been live for 12+ months:

  1. Author archives are indexed with thin content (single-author site, author page is just a list of posts)
  2. Organizational tag pages are indexed with zero content (tags like from-newsletter, 2023-archive, featured)

Neither of these causes a manual penalty on its own, but they contribute to what Google's quality systems see as a site with a high proportion of low-value pages. Over time, this can suppress rankings on your stronger content.

The fix:

  • Author pages: add a proper author bio in Settings → Staff → [your name]. Write 100–200 words. Include a profile image. This turns the thin author archive into a real page.
  • Organizational tags: convert to internal tags (#tag-name) to remove them from the sitemap entirely. See the Ghost tag pages SEO guide for the full decision matrix.

For the complete Ghost SEO setup — including the per-post and site-wide checklist items that complement your sitemap and robots configuration — see the Ghost SEO checklist and the Ghost SEO hub.

Ship optimized content this afternoon.

7-day trial. $29 when it converts. Cancel from the dashboard the second it stops earning its keep.