However, Ghost automatically appends -2 to the second post using the same slug, since the slug must be unique in the admin – even though the routes are separated.
Is there any workaround to allow the same slug (/bitcoin/) under different custom collections like /coins/ and /buy/?
Ghost’s routing system is very flexible, but it doesn’t change the fact that Ghost enforces global slug uniqueness at the database layer.
In other words, you can’t have two different posts with the exact same slug — even if they’re in separate collections.
If you try, Ghost will automatically append “-2” (or “-3”, etc.) to make the slug unique.
Unfortunately, there’s no built-in way in routes.yaml to override that behavior.
Possible Workaround (needs too much configuration (read headache) depending on the number of posts): Unique-slug + reverse-proxy rewrite (or redirects.yaml config)
Give your “buy” post a unique slug, e.g. bitcoin-buy.
Keep your “coins” post slug as bitcoin.
On your CDN or web server (NGINX, Cloudflare Workers, etc.), rewrite incoming requests from /buy/bitcoin/ to /buy/bitcoin-buy/. Or you can also use redirects.yaml.
But your posts will ALWAYS live on unique slugs.
This hides the “-buy” suffix from users while allowing Ghost to maintain unique slugs.
Each coin has multiple dedicated pages, so managing unique slugs and handling all rewrites manually (via redirects.yaml or a reverse proxy) would become extremely complex and hard to maintain.
Do you happen to know if Ghost is planning to make slug uniqueness more flexible in the future — for example, allowing duplicate slugs across separate collections? Or if there’s already an internal feature request for this?
It is the first time I have heard this voiced by someone, so I doubt that anybody is actively thinking about it.
Ideas might be a good place for this, though if you do rely on it, then the proposed solution with an external CDN/web server would probably be the quicker way to get it working.
Okay, that’s interesting — I would’ve thought others might have run into a similar issue.
The problem seems fairly common whenever someone wants to build a more nested content structure or use subtags for organization.
Of course, according to Google’s official guidelines, URL structure itself isn’t a direct ranking factor. So in the end, it’s more a matter of aesthetics and UX.
(I don’t work for Ghost, and I’m speculating here – no insider knowledge. Perhaps a member of the dev team will show up and contradict me.)
There are a lot of places where slug uniqueness is built in, including #get requests within themes, routing (where page.{slug} allows you to retrieve data), API calls, etc. Many of these parts of the code don’t actually know what the routing is – the routing is not stored with the post itself. A change to non-unique slugs would impact a lot of functionality. I think it’s unlikely that you’ll see a removal of this requirement – it’d be a lot of work for a pretty minimal gain.
You could instead make your url /staking-coin/ instead of /staking/coin/, which gets you unique slugs and gets the search term on the url, or if you want a folder-like structure, I doubt there’s much harm in /staking/coin-staking/ or /staking/how-to-stake-coin .