How to set up a 301 redirect when changing CMS collection's slug?

Hello!
I realised I have a typo in my CMS collection slug. How do I set up a 301 redirect so that all template pages are redirected with it? There are many CMS items so redirecting them all manually isn’t ideal.
So far I tried:
/oldslug → /newslug
/oldslug/(.*) → /newslug/%1
with no success. Any help is appreciated!


Here is my public share link: LINK
(how to access public share link)

Hi @Radka,

I’ve seen issues before when using a hyphen (-) in a 301 Redirect causes problems if it isn’t escaped properly.

For example…
Not escaped: /old-slug/(.) → /new-slug/%1
Escaped /old%-slug/(.
) → /new%-slug/%1

You can read more about this here: 301 redirects | Webflow University

This may not be the issue but it’s worth checking! If this isn’t the case, would you mind sharing the links you’re trying to redirect?

Hey @mww , thank you for the swift reply!
Unfortunately, this is not the case for me.
I’m trying to redirect /plasn to /plans

Hi @Radka,

Thanks for letting me know - could you send an old path and new path full URL through? Will help with investigating.

Cheers!

Unfortunately, that didn’t work either :frowning: and is also not an ideal solution when having multiple domains. On top of it, it now got stuck on one of my older attempts, and is still redirecting according to that new attempt. I did change the redirects in settings, saved and published multiple times.
Could you please confirm if the
/oldslug/(.*) → /newslug/%1
is this correct formatting for what I’m trying to achieve? If so, I don’t understand why it’s not working.

Unfortunately, that didn’t work either :frowning: and is also not an ideal solution when having multiple domains. On top of it, it now got stuck on one of my older attempts, and is still redirecting according to that new attempt. I did change the redirects in settings, saved and published multiple times.
Could you please confirm if the
/plasn/(.*) → /plans/%1
is this correct formatting for what I’m trying to achieve? If so, I don’t understand why it’s not working.

Hi @Radka,

Sorry, I meant send the full URLs through to me, not use them as the redirects. :sweat_smile:

Yes, this should work: /plasn/(.*) → /plans/%1

Without having the URLs to test it’s difficult to know what might be causing this issue.

1 Like

Of course!
Here’s the URL: Base | Evolve
And also a correction - it should redirect from /plans to /planer ,my bad.

It’s all set up and published

Ok so it’s working now? when I visit https://evolve20.webflow.io/plans/base I’m redirected to https://evolve20.webflow.io/planer/base

1 Like

What browser are you using? It’s nor working for me:

Hi @Radka,

I’m using Google Chrome - try on an incognito window or different browser and clear cache.

There can often be redirects in your browser’s cache.

You were right, it works now and also in incognito and other browsers!
Thank you very much @mww for your help!

1 Like

Yaay :partying_face:, glad you both got it working @Radka and @mww

I was a bit confused about the correlation between (.*) and %1 which I saw you both used in setting up the redirects and wanted to drop this explanation by Webflow of what they do for anyone else who’s curious

It’s from this guide on 301 redirects.

1 Like

I feel like for this scenario, the wildcard redirects should do the trick.

Essentially here’s the way to do this one:
/old-cms-folder/*
/new-cms-folder/:splat

With that said, we wrote an article that covers 301 redirects in depth that you should check out if you want to learn more about this method!

Hope that helps!

@Evgeny_Tilipman please don’t necro old posts to add links.

Also please be careful about incorrect advice-
/* and /:splat are not supported in Webflow, you’re probably thinking of Azure or Netlify redirect conventions?

This topic is temporarily closed for at least 24 hours due to a large number of community flags.

This topic was automatically opened after 2 days.