---
title: Are Vercel Preview Deployments indexed by search engines?
description: Vercel Preview Deployments aren't indexed by default. Learn how the noindex header works, how to confirm it, and the custom domain exception.
url: /kb/guide/are-vercel-preview-deployment-indexed-by-search-engines
canonical_url: "https://vercel.com/kb/guide/are-vercel-preview-deployment-indexed-by-search-engines"
published: 2025-11-03
last_updated: 2026-08-03
authors: Sam Ko
related:
  - /docs/deployments/preview-deployment-suffix
  - /docs/deployments
  - /docs/deployments/promoting-a-deployment
  - /docs/headers/response-headers
  - /docs/domains/working-with-domains/assign-domain-to-a-git-branch
  - /docs/environment-variables/system-environment-variables
  - /docs/project-configuration/vercel-json
  - /docs/deployments/environments
  - /kb/guide/avoiding-duplicate-content-with-vercel-app-urls
  - /docs/deployment-protection
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

By default, Vercel [Preview Deployments](https://vercel.com/docs/deployments/preview-deployment-suffix) aren't indexed by search engines. Because a Preview Deployment gives a realistic copy of your [Production Deployment](https://vercel.com/docs/deployments), 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.

## Why 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: noindex` by default.
  
- **Outdated Production Deployments:** When you [promote a new deployment to production](https://vercel.com/docs/deployments/promoting-a-deployment), the previous production deployment starts returning `noindex` so 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](https://vercel.com/docs/headers/response-headers).

## How to confirm a Preview Deployment is not indexed

You can check the header yourself on any Preview Deployment URL. Run the following [curl](http://curl.se/) command, which ships with most systems, to print the response headers:

`curl -I <preview-deployment-url>`

Look for this line in the output:

`x-robots-tag: noindex`

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.

## When a custom domain lets search engines index a Preview Deployment

Vercel omits `X-Robots-Tag: noindex` when a [custom domain is assigned](https://vercel.com/docs/domains/working-with-domains/assign-domain-to-a-git-branch) 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.

## How 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:

`module.exports = { async headers() { if (process.env.VERCEL_ENV !== 'preview') { return []; } return [ { source: '/:path*', headers: [ { key: 'X-Robots-Tag', value: 'noindex', }, ], }, ]; }, };` The `VERCEL_ENV` [system environment variable](https://vercel.com/docs/environment-variables/system-environment-variables) 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`](https://vercel.com/docs/project-configuration/vercel-json#headers) file instead. Match the custom domain with the `has` host condition so the header applies only to that domain:

`{ "headers": [{ "source": "/(.*)", "has": [ { "type": "host", "value": "staging.example.com" } ], "headers": [ { "key": "X-Robots-Tag", "value": "noindex" } ] } ] }` 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. ## Next 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](https://vercel.com/new) or [browse the templates](https://vercel.com/templates) to deploy a framework-ready starting point.

## **Related resources**

- [Response headers reference](https://vercel.com/docs/headers/response-headers)
  
- [Deployment environments](https://vercel.com/docs/deployments/environments)
  
- [Assigning a domain to a Git branch](https://vercel.com/docs/domains/working-with-domains/assign-domain-to-a-git-branch)
  
- [Configuring headers in vercel.json](https://vercel.com/docs/project-configuration/vercel-json#headers)
  
- [Avoiding duplicate content with](https://vercel.com/kb/guide/avoiding-duplicate-content-with-vercel-app-urls) [vercel.app](http://vercel.app) [URLs](https://vercel.com/kb/guide/avoiding-duplicate-content-with-vercel-app-urls)
  

## Frequently asked questions

### Does 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](https://vercel.com/docs/deployment-protection), which requires authentication before the page loads.

### Will 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.

### Are 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.

### How 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](http://vercel.app) [URLs](https://vercel.com/kb/guide/avoiding-duplicate-content-with-vercel-app-urls) to point search engines at a single canonical address.