
How to use deploy previews on Netlify
Deploy previews are one of Netlify’s most powerful features, especially when you work with Git-based workflows. They let you preview every pull request or branch in its own live URL, before anything is merged or published.
In this guide, you’ll learn what deploy previews are, how they work, and how to start using them effectively in your projects.
What are deploy previews
A deploy preview is a temporary, fully deployed version of your site that Netlify creates for a pull request or branch. It uses the exact same build process as your production site, but publishes the result to a unique preview URL instead of your main domain.
This means reviewers can click a link and see a real, hosted version of the site, rather than relying on screenshots or local builds.
Deploy previews are created automatically when Netlify is connected to a Git provider like GitHub, GitLab, or Bitbucket.
Why deploy previews are useful
Deploy previews solve a few common problems in modern web development.
First, they make reviews much easier. Designers, content editors, and non-technical stakeholders can review changes directly in the browser.
Second, they reduce risk. You can catch layout issues, broken links, or missing content before anything reaches production.
Third, they improve collaboration. Every pull request gets its own URL, so multiple changes can be reviewed in parallel without conflicts.
Prerequisites
Before you can use deploy previews, make sure you have:
- A Netlify account
- A site connected to a Git repository
- Continuous deployment enabled
- A Git workflow that uses branches or pull requests
If your site already redeploys automatically when you push commits, you’re ready.
How deploy previews work in practice
When you open a pull request, Netlify detects it through your Git provider integration.
Netlify then:
- Clones the branch associated with the pull request
- Runs the same build command as production
- Publishes the output to a unique preview URL
- Attaches the preview link to the pull request
Each new commit updates the same preview, so reviewers always see the latest version.
Enabling deploy previews
In most cases, deploy previews are enabled by default.
To verify:
- Open your site in the Netlify dashboard
- Go to Site settings
- Open Build & deploy
- Check the Deploy contexts section
Make sure Deploy previews are enabled. You can also customize settings separately for production, previews, and branch deploys.
Preview URLs and behavior
Each deploy preview gets a URL like:
https://deploy-preview-42--your-site-name.netlify.app
The number corresponds to the pull request or deploy ID. These URLs are public but hard to guess, making them safe for sharing with your team.
Preview deploys use the same environment variables as production by default, unless you override them.
Environment variables for deploy previews
Sometimes you want previews to behave differently from production.
Netlify lets you define environment variables per deploy context.
For example:
- Use a staging API
- Enable debug logging
- Disable analytics tracking
You can configure this in Site settings → Environment variables by selecting the Deploy previews context.
Common use cases
Deploy previews are useful in many scenarios:
- Reviewing content changes from a CMS
- Testing new layouts or navigation
- Verifying SEO metadata
- QA testing before release
- Sharing work-in-progress features
They are especially valuable when non-developers need to approve changes.
Cleaning up old previews
Deploy previews are temporary. Netlify automatically removes them when a pull request is closed or merged.
You don’t need to manage cleanup manually, which keeps your dashboard tidy and avoids unnecessary usage.
Best practices
A few tips to get the most out of deploy previews:
- Share preview links directly in pull request discussions
- Use preview-specific environment variables
- Encourage designers and editors to review previews themselves
- Treat preview feedback as part of your review process
Over time, deploy previews become a natural part of how your team ships changes.
Final thoughts
Deploy previews turn every pull request into a live demo. They reduce friction, improve confidence, and make collaboration smoother for everyone involved.
Once you start using them regularly, it’s hard to imagine shipping without them.
Manage Netlify on the go
Download Netli.fyi and monitor your sites, check deploys, and manage your projects from anywhere.


