If your staging site is indexed by Google, you will usually find out the awkward way: a colleague searches your brand and sees staging.yoursite.com next to the real result, with placeholder copy or half-finished pages. On Next.js and Sanity builds this is a configuration gap, not a bug, and it is fixable in an afternoon. The cleanup takes longer than the fix, so the order of steps matters.
Symptoms that your staging site is leaking into search
The signs are usually one of these:
A site:staging.yoursite.com search in Google returns results.
Search Console shows a property or a set of URLs you do not recognise, or the Pages report lists "Duplicate, Google chose different canonical than user".
Your real sitemap contains staging hostnames, or the staging sitemap is submitted by mistake.
Analytics shows sessions landing on a staging hostname from organic search.
A preview or staging URL appears in a competitor's backlink report because someone shared it publicly.
Staging pages rarely rank above production…