Deploy a Pages preview from a branch

deploy & domains

// what it does

Deploys to a non-production branch, producing a unique preview URL (<hash>.<project>.pages.dev) without touching production. Use it to share a build for review or to run staging against preview-scoped bindings and vars. Any branch name other than your configured production branch creates a preview.

// shell

$ wrangler pages deploy ./dist --project-name my-site --branch preview

// gotcha

Preview deployments use the project's preview environment variables and bindings, configured separately from production — a preview can behave differently purely because its vars differ.