SEO audits › Ghost
Ghost CMS SEO audit
Ghost handles most technical SEO for a publication by itself: the sitemap, canonical tags and structured data are generated for you. The trouble starts where you step outside the defaults, with a custom theme, a redirects file or your own proxy.
This page covers where each of those pieces lives in Ghost CMS and how to fix the ones that go wrong.
Run a free audit on your Ghost site
All 140+ checks, no credit card. Last reviewed 2026-11-26.
Ghost CMS sitemap
Every Ghost site has a sitemap at /sitemap.xml. Ghost generates it automatically and updates it when you publish. There is nothing to switch on and no setting to edit it.
It is an index that links to four child sitemaps: /sitemap-pages.xml, /sitemap-posts.xml, /sitemap-authors.xml and /sitemap-tags.xml. Ghost's default robots.txt already points crawlers at it.
- Open
https://yoursite.com/sitemap.xmlto confirm it loads. - In Google Search Console, go to Sitemaps, enter
sitemap.xmland submit. You only need to do this once.
Because the sitemap cannot be edited, the way to keep something out of it is to change the content itself. A post or page whose Canonical URL field points at a different address is left out automatically. Unpublished and scheduled posts are not listed.
If the sitemap lists http:// addresses or the wrong domain, the site url in your Ghost configuration is wrong. On a self-hosted install, correct it in the config file and run ghost restart.
A crawl compares the sitemap against the live site and flags entries that return an error, redirect, or carry a canonical pointing somewhere else.
Wrendex checks for this: Sitemap URL returns 4xx, Sitemap URL redirects, Sitemap URL non-canonical, Sitemap URL is noindex
Ghost CMS robots.txt
Ghost serves a default robots.txt at /robots.txt. There is no editor for it in Ghost Admin. To change it, you add your own robots.txt file to the root of your theme, and that file replaces the default.
The default allows everything public and blocks only Ghost's own admin and internal paths:
- Download your current theme from Ghost Admin and unzip it.
- Create a plain text file named
robots.txtin the top-level folder of the theme, next topackage.json. - Start from the default above and add your own rules. Keep the
Sitemap:line with your real domain, because your file replaces the default completely. - Zip the theme, upload it in Ghost Admin and activate it.
- Open
https://yoursite.com/robots.txtto confirm the new version is live.
Default Ghost robots.txt
User-agent: *
Sitemap: https://yoursite.com/sitemap.xml
Disallow: /ghost/
Disallow: /email/
Disallow: /members/api/comments/counts/
Disallow: /r/
Disallow: /webmentions/receive/
Disallow: /.ghost/analytics/api/
On Ghost(Pro), uploading a custom theme is only available on plans that include custom themes. See Ghost's guide to modifying robots.txt.
If your robots.txt shows only User-agent: * and Disallow: /, the site is in private mode. Ghost blocks all crawlers and switches off its SEO features while the shared password is on. Turn it off under Settings > Membership > Access, in the "Make site private" option, when you are ready to be found.
Wrendex checks for this: robots.txt inaccessible
Ghost canonical URLs
Ghost CMS adds a canonical tag to every page of your site automatically, and by default each page points at its own address. You only need to touch it when a post should credit a different URL as the original.
The usual case is a post that was first published somewhere else, such as a guest article or a piece republished from another publication.
- Open the post or page in the Ghost editor.
- Open the post settings menu.
- Enter the full address of the original in the Canonical URL field, including
https://. - Update the post, then view the page source and check the
rel="canonical"tag.
Setting a custom canonical also removes that post from your sitemap, since you are telling search engines the real version lives elsewhere. If a post goes missing from /sitemap-posts.xml, look for a forgotten value in this field.
Ghost builds the automatic canonical from the site url in its configuration. If that is set to http:// while visitors are served HTTPS, every canonical on the site points at an address that redirects. Fix the url setting, not the individual posts.
Ghost forces a trailing slash on its URLs, so /my-post redirects to /my-post/. Internal links written without the slash still work but go through a redirect first. A crawl lists those, along with canonicals that point at redirects or dead pages.
Wrendex checks for this: Canonical points to redirect, Canonical points to 4xx, Canonical https to http, Sitemap URL non-canonical, Links to redirected page
Ghost CMS redirects (the redirects.yaml file)
Redirects in Ghost CMS live in one file, redirects.yaml. You download it from Ghost Admin, edit it and upload it again. In current versions it is under Settings > Advanced > Labs, in the Beta features tab.
The file has two lists: 301 for permanent redirects and 302 for temporary ones. Each line is the old path, a colon, then the new path.
- In Ghost Admin, go to Settings > Advanced > Labs and open the Beta features tab.
- Next to Redirects, download the current file. Always start from the downloaded copy, because an upload replaces every existing redirect.
- Add your rules under
301:or302:. Indent with spaces, not tabs. - Upload the file in the same place.
- Visit one of the old addresses to confirm it lands on the new one.
redirects.yaml
301:
/old-post-name/: /new-post-name/
^\/category\/(.*): /tag/$1
302:
/summer-sale/: /offers/
The left side of each rule is treated as a regular expression. That is what makes patterns like the /category/ example work, moving a whole section in one line with $1. It also means a rule matches any path that ends with it, so /news/ also catches /archive/news/. Start the pattern with ^ when you need it to match from the beginning of the path.
Use 301 for anything that has moved for good. Do not use this file for www or HTTP to HTTPS redirects. Ghost's documentation says those belong with your DNS or hosting provider. You also do not need rules for trailing slashes, since Ghost adds those itself.
Older sites may still have a redirects.json file. Ghost accepts it for now but plans to drop the JSON format, so convert it to YAML when you next edit it. On a self-hosted install the file is stored at content/data/redirects.yaml, and replacing it on disk requires a restart.
After a restructure, crawl the site to find internal links that still point at the old addresses, redirects that chain through several hops, and redirects that end on a 404.
Wrendex checks for this: Redirect chain, 302 temporary redirect, Broken redirect, Redirect loop, Links to redirected page
Ghost "too many redirects" error
On a self-hosted Ghost site, a "too many redirects" error (ERR_TOO_MANY_REDIRECTS) almost always means Ghost is configured with an https:// URL but sits behind a proxy that passes requests to it over plain HTTP without saying the original request was secure. Ghost sees an insecure request, redirects it to HTTPS, the proxy forwards it the same way, and the loop repeats.
The fix is to have the proxy send the X-Forwarded-Proto header.
- Check the
urlvalue in your Ghost config. If the site is served over HTTPS it must start withhttps://. - Check your proxy config for
X-Forwarded-Proto. With nginx,$schemeworks when nginx itself receives the HTTPS request. If another layer in front of nginx terminates HTTPS, set the header tohttpsexplicitly. - If you use Cloudflare, check the SSL/TLS encryption mode. In Flexible mode Cloudflare talks to your server over HTTP, which triggers the same loop. Install a certificate on the origin and switch to Full or Full (strict).
- Reload nginx, run
ghost restart, then test in a private browser window. Browsers cache 301 redirects, so a normal window can keep showing the old loop.
nginx, inside the server block that handles HTTPS
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
If only certain pages loop, look at redirects.yaml. The left side of each rule is a regular expression, and it matches any path that ends with it. A rule like /news/: /archive/news/ also matches its own destination and redirects it again. Start the pattern with ^, for example ^\/news\/, so it matches only the old address.
A crawl follows every redirect on the site and reports loops and long chains with the full hop sequence, which shows you which layer is sending each redirect.
Wrendex checks for this: Redirect loop, Redirect chain too long, Redirect chain
Sources
- Ghost Help: SEO in Ghost
- Ghost Help: Modifying robots.txt
- Ghost Help: Post settings
- Ghost Help: Redirects
- Ghost Help: Site setup (private site mode)
- Ghost tutorial: Implementing redirects in Ghost
- Ghost developer docs: URLs and dynamic routing (redirects)
- Ghost developer docs: Theme structure
- Ghost developer docs: Configuration
- Ghost developer docs: Proxying HTTPS and infinite redirect loops
- Ghost source: default robots.txt
- Ghost source: sitemap service
- Cloudflare docs: ERR_TOO_MANY_REDIRECTS