Status codes
- Documented behavior
- 301 (permanent) and 302 (temporary); the help article lists no others
Add Ghost 301 and 302 redirects by uploading redirects.yaml in Labs, write regex rules, avoid the tab and empty-file traps, and test them.
Ghost handles redirects with a redirects.yaml file. In Ghost Admin, go to Settings → Advanced → Labs, open the Beta features tab, download the current file, add rules under 301: or 302:, and upload it again. Indent with spaces, and never upload an empty file, which removes every existing redirect.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
301 and 302; each rule is /from: /to on its own indented linecontent/data/redirects.yaml; replace it there and restart Ghost for changes to take effect301:
/old-postname/: /new-postname/
302:
/temporary-redirect-from: /temporary-redirect-toGhost's developer docs say uploading through Ghost Admin is the recommended method, and that the same upload route covers routes.yaml. If you inherited a site from before Ghost 4.0, you may have redirects.json. It still works, but write new rules in YAML so you are not caught by the removal of JSON support.
In Ghost Admin, go to Settings → Advanced → Labs, per Ghost's redirects help article. Use the Open/Close toggle to expand the Labs area.
On the Beta features tab, download your existing redirects.yaml. Edit that copy rather than starting a new one, since Ghost's tutorial notes that an empty upload removes every redirect.
Open the file in a code editor and add rules under 301: or 302:. Use a 301 for a move you do not plan to undo and a 302 for a temporary one. Google says to use a permanent redirect when you are sure it won't be reverted.
Upload the file in the same Labs area, then visit an old URL in the browser and confirm it lands on the new one.
The first moves /blog/post-slug/ to /post-slug/. The second turns WordPress category URLs into tag URLs, and the third strips year, month and day segments from WordPress dates. When you move off AMP, the same format works for sending old AMP paths to the normal post; see Ghost AMP.
301:
^\/blog\/([a-z0-9-]+)\/$: /$1
^\/category\/(.*): /tag/$1
^\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/(.*): /$1Ghost forces them automatically, so there is no duplicate-content case to redirect.
Ghost's docs say to handle these at your DNS provider.
Use dynamic routing in routes.yaml; you may still need redirects.yaml to send existing content to the new paths.
Redirect each old URL to the closest equivalent page instead.
Ghost's docs state no limit on rule count. For what a 301 does for search, read the 301 redirect glossary entry.
Look for 301 (or 302) on the status line and the new path in the location header. If you get a 404 instead, check for tabs in the file, a pattern that does not match the exact old path, and a rule listed under the wrong key.
curl -sI https://example.com/old-postname/ | head -52 questions people ask next, answered from the sources on this page.
Ghost's redirects help article says Ghost supports 301 and 302 redirects and lists no other status codes.
Existing JSON files still work, but Ghost's docs say JSON support will be removed in a later version, so use YAML.
Run the free audit, then approve the fixes. Every change can be undone.