In short. Change a collection’s permalink property in routes.yaml, apply the file, and configure redirects for old post URLs.
Definition: A Ghost collection groups posts under a listing URL and defines their individual URL pattern. Collection patterns are configured with the
permalinkproperty inroutes.yaml.
Key facts
- As of October 2026, Ghost's routing documentation places routing configuration in
content/settings/routes.yamland supports uploading the file through Ghost Admin. - Ghost's collections tutorial separates the collection path, such as
/french/, from the post pattern, such as/french/{slug}/. - Ghost's redirects help page documents a separate
redirects.yamlfile for forwarding old URLs after a permalink change.
Which setting changes the listing and post URLs?
Ghost's collections tutorial starts with a root collection at /, a permalink of /{slug}/, and the index template. A slug is the URL identifier used for an individual post, such as hello-world in the tutorial's example.
Ghost’s routing documentation gives this configuration for a blog section and a custom homepage:
routes:
/: home
collections:
/blog/:
permalink: /blog/{slug}/
template: index
Here, /blog/ is the collection listing, while /blog/{slug}/ determines individual post URLs. The index value selects index.hbs for the listing; the homepage route selects home.hbs. That homepage template must be available in the theme for this configuration.
How is the edited file applied?
Ghost's routing documentation describes downloading and uploading routes.yaml under Settings » Labs. An upload applies the routes immediately. Editing content/settings/routes.yaml directly on the server requires a Ghost restart.
The file uses YAML, a configuration format whose indentation expresses nesting. Ghost specifies two spaces for each nesting level. The example above shows the routing and collection sections; the default file also contains taxonomies, which defines tag and author archive paths. Editing the downloaded file preserves those existing settings while the collection configuration changes.
How do separate collections select their posts?
Ghost's collections tutorial uses a filter to select posts by tag and an exclusion filter for the remaining homepage collection:
collections:
/french/:
permalink: /french/{slug}/
template: cuisine
filter: tag:french
/:
permalink: /{slug}/
template: index
filter: tag:-[french]
Posts tagged French belong to the /french/ collection and use its post pattern. The cuisine value requires a cuisine.hbs template. Collections are exclusive: a post belongs to one collection at a time. The exclusion keeps those posts out of the homepage collection.
What happens to links using the previous pattern?
Ghost's redirects tutorial recommends redirecting URLs that move. A permanent redirect forwards an old address to its replacement and uses the 301 key in redirects.yaml.
For a move from root-level post URLs to the blog pattern, an individual rule can follow this structure, with the publication's actual slug substituted:
301:
/hello-world/: /blog/hello-world/
After the edited redirect file is uploaded, the tutorial instructs testing by visiting an old URL. A useful check follows that process for a moved post and confirms that the browser reaches its intended new address.
Related terms
- How do I change a Ghost post's URL?
- How do I upload a redirects.yaml file in Ghost?
- How do I write a regular expression redirect in Ghost?
FAQ
Can I change only the collection's listing template?
Yes. In Ghost's collections tutorial, changing template: index to template: cuisine selects cuisine.hbs. The permalink property controls the post URL pattern separately.
Where do I upload redirects for the old URLs?
You can use Settings → Advanced → Labs, open Labs, and select Beta features, as described in Ghost's redirects help page. Download the existing redirects.yaml, edit its rules, and upload the edited file.
Sources
- Ghost, "URLs & Dynamic Routing", undated
- Ghost, "Building content collections", undated
- Ghost, "Redirects", undated
- Ghost, "Implementing redirects", undated
Check how a page reads to answer engines. Open the GEO score analyzer