CMS nested slug issue

Hello

I have the following structure in my Webflow site with CMS:

Ideally, what I want is:

domain.com/blog - The blog home page
domain.com/blog/category-name/blog-post-title - A Blog Post
domain.com/blog/categories - List all Categories
domain.com/blog/categories/category-name - Details for a single Category
domain.com/blog/authors - List all Authors
domain.com/blog/authors/author-name - Details for a single Author

What I currently have is:

domain.com/blog - works fine
domain.com/blog/blog-post-title - works fine (but would prefer the category in the slug)
domain.com/blog/categories - 404 error even though page is there
domain.com/blog/categories/category-name - works fine
domain.com/blog/authors - 404 error even though page is there
domain.com/blog/authors/author-name - works fine

I’m guessing this is caused by a conflict between the /blog slug I have set on the CMS collection and the /blog folder I have in the site structure, so I have two questions…

  1. is it possible to have blog articles under the category slug? e.g domain.com/blog/category-name/blog-post-title ?
  2. Is it possible to have a listing page for all categories at domain.com/blog/categories and a listing page for all authors at domain.com/blog/authors ?

Thank you!

Exactly. From a site structure perspective, these are both considered folders, so the namespaces cannot overlap.

Not in a Webflow-hosted site, unless you design a reverse proxy to support the pathing you want.

Yes if /blog is a folder, no if it’s a collection page.

However if you’re really set on this structure, and ok with redirects, you can mimic it visually. You’d create these pages somewhere else, and then should be able to 301 redirect to them from your desired paths.

On those pages you can have a small JS that updates the browser history as well so that the displayed URL in the URL bar matches.

e.g.

history.replaceState(null, null, '/blog/categories');

1 Like

Since writing the approach above, I’ve invested a lot more time in the reverse proxy solution. It can be complex to build, depending on your CMS structure, but it is the best solution I’ve found for my clients who need an actual semantic path structure.

With a reverse proxy you can handle all of the pieces;

  • Actual content rewriting to your semantic paths.
  • Updates to canonical URLs
  • Corrected sitemap
  • Redirects from the original path to the semantic path

For anyone who encounters this need, here’s a breakdown of the solution I’ve built.