Vercel

Vercel X-Robots-Tag: preview and stale deploys

Vercel noindexes Preview Deployments and outdated production deploys by header. Where the header comes from, the custom domain exception, and the fix.

Vercel adds "X-Robots-Tag: noindex" to Preview Deployments and to outdated production deployments automatically, and omits it when a custom domain is assigned to a non-production branch. Check which kind of URL is serving, point the custom domain at the production deployment, redeploy, then verify the header on the live URL.

Why Vercel does this

Vercel's response headers reference lists x-robots-tag as "Present only on" Preview deployments and "Outdated production deployments. When you promote a new deployment to production, the x-robots-tag header will be sent to requests for outdated production deployments." Two directions of trouble follow. A stale production deployment keeps serving with noindex when domain cutover or a promote step does not complete, which reads as the site losing Google overnight. And the documented exception: Vercel omits the header "when a custom domain is assigned to a non-production branch", so a staging domain like staging.example.com becomes fully indexable, the opposite problem, duplicate content competing with production.

Check it right now

Before changing anything, confirm what a crawler actually sees. The check is free, takes one URL and needs no account.

Run the check

How to fix it

  1. Run the X-Robots-Tag checker on the URL Google is showing or the URL that should be indexed.
  2. If production returns noindex, check whether the custom domain points at an outdated deployment. Open the project's deployments and confirm which deployment the domain serves, then repoint or promote the current one.
  3. If a staging custom domain is missing noindex and should carry it, add the header in your framework first. In a Next.js project, gate an "X-Robots-Tag: noindex" header on "process.env.VERCEL_ENV equals preview", returning early for production.
  4. If the framework cannot set headers, add the header in vercel.json with a "has" host condition matching the staging domain, which Vercel documents as the fallback.
  5. Redeploy and re-run the checker on both the production domain and the staging domain.
  6. If Google already lists the staging host, use Search Console > Removals after the header is live; the header is the permanent part of the fix.

Why it happens again

The header is platform-owned and invisible in the codebase, so no diff or code review ever shows it. Every domain reassignment, branch-domain attach, and deploy promotion can flip which URLs carry noindex, and a production deploy left stale after a promote keeps serving noindex until someone checks headers rather than pages.

stillindexed re-checks the URLs you give it every 30 minutes on Starter and alerts when a directive changes, at most 30 minutes after it does. It is a monitor rather than a crawler: it watches a list you choose and tells you when one of seven things changes. Start with a 30-day free trial, 3 sites, no card required, and a 30 day refund after that.

Start the 30-day free trial, 3 sites, no card required

Catching it next time

Fixing it once is the easy half. The setting that caused this can be changed again by anyone with access, and the page will keep returning 200 while it happens.

Other ways Vercel loses pages

A staging or preview site indexed by Google, on other platforms

How Search Console reports it

Sources

Every claim about Vercel above is from their own documentation, read on 2026-10-25. Platforms change their settings; if one of these is out of date, their page wins and we would like to know.