---
title: Remove trailing slashes to normalize URLs
summary: Treat URLs with and without suffixed slashes as equivalent, or redirect URLs with slashes to the version without.
url: https://www.fastly.com/documentation/solutions/examples/remove-trailing-slashes-to-normalize-urls
---

Treat URLs with and without suffixed slashes as equivalent, or redirect URLs with slashes to the version without.

## VCL

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/ff0db45f)

## Compute

### Rust

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/f2fbb82e)

### Javascript

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/f55e1e12)

### Go

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/f813af9b)

