# Exclude Files from Deployments with .vercelignore

The `.vercelignore` file can be used to specify files and directories that should be excluded from the deployment process when using Vercel. This file works similarly to a `.gitignore` file, but it is specific to Vercel.

The `.vercelignore` file should be placed in the root directory of your project and should contain a list of files and directories, one per line, that should be excluded from deployment. For example, to prevent an `/image` directory and `/private.html` file within a project from being uploaded to Vercel, you would add them to the `.vercelignore` file like this:

```bash filename=".vercelignore"
image
private.html
```

## Allowlist

A typical `.vercelignore` file assumes all files are allowed and each entry is a pattern to ignore. Alternatively, you can ignore all files and each entry is a pattern to allow.

Add a wildcard `/*` as the first line in `.vercelignore` to ensure all directories and files in the **project root** are ignored. The following lines must then start with a `!` to invert the ignore action and ensure the directory or file is allowed.

```bash filename=".vercelignore"