By default, Vercel Preview Deployments aren't indexed by search engines. Because a Preview Deployment gives a realistic copy of your Production Deployment, it serves the same content at a different URL. If indexed, that duplicate content could split your SEO ranking across two addresses or lead search engines to penalize your site.
Below, you'll see how Vercel applies the noindex header by default, how to confirm the header is set, and the one case where you need to add it yourself.
Copy link to headingWhy Preview Deployments aren't indexed by search engines
Vercel adds an X-Robots-Tag: noindex HTTP response header to every Preview Deployment automatically. That header tells search engines to leave the deployment out of their index, ensuring your preview URLs don't compete with production URLs for ranking.
The same header is applied to two kinds of deployments:
- Preview Deployments: Every deployment from a non-production branch carries
X-Robots-Tag: noindexby default. - Outdated Production Deployments: When you promote a new deployment to production, the previous production deployment starts returning
noindexso its now-stale content drops out of search results.
Because Vercel sets this at the platform level, most projects need no configuration to keep preview content out of search engines. To see the full list of headers Vercel adds, review the response headers reference.
Copy link to headingHow to confirm a Preview Deployment is not indexed
You can check the header yourself on any Preview Deployment URL. Run the following curl command, which ships with most systems, to print the response headers:
Look for this line in the output:
If you see x-robots-tag: noindex, search engines are instructed not to index that deployment. If the header is missing, the deployment is likely served over a custom domain, the one case Vercel treats differently.
Copy link to headingWhen a custom domain lets search engines index a Preview Deployment
Vercel omits X-Robots-Tag: noindex when a custom domain is assigned to a non-production branch. The assumption is that a custom domain on a branch (for example, a staging.example.com domain) is an intentional environment you may want reachable, so the platform doesn't force noindex.
The tradeoff is that search engines can now index that domain and its duplicate content. If you want a custom-domain preview to stay out of search results, add the noindex header yourself.
Copy link to headingHow to block search engines from indexing a custom domain Preview Deployment
Set the header in your framework first, since framework-level headers are the recommended approach and tend to be more reliable than platform configuration.
For a Next.js project, add a headers function to next.config.js that returns X-Robots-Tag: noindex only when the deployment is a preview:
The VERCEL_ENV system environment variable resolves to preview on preview builds, so the header applies only where you want it.
If you don't use a framework, or your framework can't inject response headers, set the header in your vercel.json file instead. Match the custom domain with the has host condition so the header applies only to that domain:
After you redeploy, run the same curl -I check against the custom domain to confirm the header is now present. Use vercel.json only when the framework method isn't available, since configuring headers there can interact with other routing rules.
Copy link to headingNext steps
With noindex in place where you need it, your preview content stays separated from production in search results. To put this into practice, start a new Vercel project or browse the templates to deploy a framework-ready starting point.
Copy link to headingRelated resources
- Response headers reference
- Deployment environments
- Assigning a domain to a Git branch
- Configuring headers in vercel.json
- Avoiding duplicate content with vercel.app URLs
Copy link to headingFrequently asked questions
Copy link to headingDoes noindex make a Preview Deployment private?
No. The X-Robots-Tag: noindex header only asks search engines not to index the deployment. Anyone with the URL can still open it. To restrict who can view a Preview Deployment, use Deployment Protection, which requires authentication before the page loads.
Copy link to headingWill noindex remove a Preview Deployment already indexed by Google?
The noindex header tells crawlers to drop the page the next time they crawl it, so removal isn't instant. To speed it up, request removal in Google Search Console for that URL. Once the header is in place, the page won't return to the index on future crawls.
Copy link to headingAre outdated Production Deployments indexed by search engines?
No. When you promote a new deployment to production, Vercel adds X-Robots-Tag: noindex to the previous production deployment automatically. This keeps outdated versions of your site out of search results. Only the current production deployment stays indexed so stale content doesn’t compete with it for ranking.
Copy link to headingHow do I stop my .vercel.app URL from being indexed?
Preview .vercel.app URLs already return X-Robots-Tag: noindex by default. If a production .vercel.app URL is being indexed alongside your custom domain, consider avoiding duplicate content with vercel.app URLs to point search engines at a single canonical address.