How do I add multiple sub-folders in URL slug?

Hi,

I’m building out my blog and want to format my blog categories like this:

site.com/blog/category/category-name

The problem is, whenever I save the “blog/category/” in the custom URL slug for my Category Collection, webflow changes this to:

site.com/blog-category/category-name

How do I preserve the forward slash?

Why do I want this? Want to mirror blog URL structure from SEO authorities Moz, Neil Patel etc.

1 Like

Hi @jwb Jacob,

Welcome to our community and your first of many posts here.

The structure for URLs in the CMS within Webflow is built with the collections in mind. When you create a collection of categories you are using this specifically as a reference field for your actual blog posts.

The blog-category/category-name is not the one you should be focusing on. The site.com/blog/post-name is the one you should focus your attention to.

Have you created your blog post collection yet? Linked your categories to this collection?

1 Like

Hey Brandon, thanks for the quick reply!

I’ve setup my Collections as follows (and made connections from Blog to Author, Tags and Categories):

29

Here’s a work in progress example of a blog, with an URL that’s perfectly fine: https://tldr.webflow.io/blog/all-csgo-player-transfers-2019

However, what I’m trying to achieve is to get a my “guide” blog category to format as mentioned in the original post, which it currently does not. As you can see from the example above, once you click guide you end up at (don’t mind the page not found haven’t designed it yet):

https://tldr.webflow.io/blog-category/guides

As opposed to

https://tldr.webflow.io/blog/category/guides

Hi @jwb,

This should be archived by changing the canonical address! It’s a matter of adding code to that page. Use this link for a description and how-to!

https://yoast.com/rel-canonical/amp/

3 Likes

I see - so I’d apply the canonical address to a page that I setup myself, per category with the slug of my choosing and then apply the canonical (soft redirect) on the auto generated one for SEO. ’

Thank you for your help!

1 Like

So, whatever url we are pushing in canonical with the category name in this case. Will redirects be needed since, we are telling google that url structure with category exists but in reality it doesn’t.

Yes @veermanhas I believe that is the case. However, I would recommend some trial and error to see how it works.

TBH, I’ve never actually done it myself, I was advised on that process by a colleague.

Best Regards,
~ Brandon

Hi @jwb

Did this work? and how did you set it up?

Decided against it since it’s not an actual directory but a redirect, so yes the solution worked but no I didn’t apply.

Wanted the real deal not a workaround.

Ok, as I understand it Cloudflare is the only option for creating subfolders for collections i Webflow :confused:

@Christoffer do you have a reference for this option you reference using Cloudflare?

Hi @banderilla

In a post here at the forum, search for it and it will probably show up! It was a link to a Medium article I think.

I believe this is the article:

Hey this solution doesn’t work on my side after implementing the code in the header of the page?

See read-only link: Webflow - MyNextPlay

Hey Marvin,

I may be incorrect here, but I don’t expect that canonical URLs & redirects are a viable solution for good SEO. It’s bad for UX as well, since;

  1. The URLs you enter aren’t the ones you end on
  2. There’s a lot of unhelpful redirecting and reloading

What I think Brandon was suggesting is that some services will look at the canonical URL, and then use it as the official path of the page, along with its keywording structure, for SEO purposes. If you then companion that with some redirects, you can get the user where they need to be to actually see that page, e.g.

User requested;
/sweater-vests/lambs-wool/the-sherpa-2000

And they got redirected to;
/products/the-sherpa-2000

Which contains a canonical URL describing that requested URL.
It could work, but…

  1. Requires some setup
  2. Is challenging to maintain
  3. Messes with your UX due to the redirects
  4. May do nothing for your SEO - because canonical URLs should not redirect

Hey! Thanks for taking the time to answer to my comment, really appreciate your expertise on this.

Here is the actual issue I’m trying to solve, would love to have your opinion on this:

I have a folder “Baseball” with “Inform” & “Guide” pages that have a collection list of articles:
/baseball/inform & /baseball/guide

But when the user clicks on one of the article it leads him to:
/inform/article-name

When it should be:
/baseball/inform/article-name

Because the non-profit that I’m working with has already a “Softball” folder and has plans to expand to other sports, hence the important part of having the /sport/inform/article-name structure

It’s not natively supported in Webflow, and honestly it’s probably not worth the battle.

But I’ve collected my notes here, with a demo to show you how you can built this if you really want to.

Here’s the part with the demo;

1 Like

I am trying to change the URL of my CMS collection list to a subfolder aswell.
I want it to be:
courses.digiversity.tv/creative-space/julia/julia-portraits/julia-portrait-page
But when I enter this into the URL field, Webflow changes it to
courses.digiversity.tv/creative-space-julia-julia-portraits/julia-portrait-page
It changes the “/” to “-”

The weird thing is, that other collections lists do have the directory and I have no clue how I did that.

If it is possible to set up one CMS List in the directory, it must be possible to change others too?

Hi Julia,

If the path you want is fixed, like;
//courses.digiversity.ty/creative-space/julia/julia-portraits/...
with no variation in the /creative-space/julia/ part of the path, they you can just create that as;

creative-space ( folder )
  julia ( folder )
    julia-portraits ( collection page )
      ... ( collection item slugs )

The option to place a collection page within a folder it handled on the collection page settings, near the top. Yeah, that’s a bit unintuitive to manage different parts of the path under different settings screens, but are actually reasons for that design.

If you did need variation in /creative-space/julia/ part of the path, such as categories, from the CMS items, date or year ranges, etc, you’d need to use a reverse proxy. I build these for clients, usually for SEO purposes.