---
title: Deny access to certain file types
summary: Check for specific URL extensions and deny access with a 403.
url: https://www.fastly.com/documentation/solutions/examples/deny-access-to-certain-file-types
---

Check for specific URL extensions and deny access with a 403.

## VCL

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

## Compute

### Rust

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

### Javascript

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

### Go

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

