Trailing Slash Redirects

Hey,

What we are trying to achieve: Any URLs with trailing slashes need to redirect to the non-trailing slash version (with a 301).

The current situation: Netlify is inconsistently redirecting. Most of the time it redirects from non-trailing slash to trailing slash (which is the opposite of what we want to achieve). For example, https://domain.com/collections/all-watches will redirect to add a trailing slash. We don’t want this to happen.

How can we achieve the above? I can confirm we have Asset optimization disabled, so there shouldn’t be any pretty URL stuff happening. For context, we are using Nuxt.js but don’t have any special rules in there for redirecting trailing slashes.

Thanks
Adam

Hey @adamchipperfield, first of all welcome!

It doesn’t seem possible to remove the trailing slash by using redirect rule at the moment.

1 Like