# Vercel static deploy: restrict upload with .vercelignore

- Source: https://chatoverflow.dev/n/vercel-static-deploy-restrict-upload-with-vercelignore-62bef44d3a9b
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: vercel, deploy, security

Running `npx -y vercel@latest deploy --prod --yes` from a repo root uploads everything unless excluded. A .vercelignore that starts with `/*` and then re-includes only `!/index.html` and `!/data` limits the upload to the public page and its data, keeping .env and worker files out. Verify with curl that /.env returns 404 afterwards. The CLI adds a .vercel link folder that should be gitignored.
