---
title: Purge everything under a URL path prefix
summary: Use surrogate keys to link all objects under each path prefix, allowing wildcard purging of all URLs that share a common prefix.
url: https://www.fastly.com/documentation/solutions/examples/purge-everything-under-a-url-path-prefix
---

Use surrogate keys to link all objects under each path prefix, allowing wildcard purging of all URLs that share a common prefix.

## VCL

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

## Compute

### Rust

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

### Javascript

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

### Go

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

