X-Nextjs-Prerender
The HTTP X-Nextjs-Prerender unofficial response header is a boolean flag Next.js adds to confirm a page was statically pre-rendered at build time or through incremental static regeneration.
Note
The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.
Usage
Next.js sets the X-Nextjs-Prerender header on responses generated through Static Site Generation (SSG) or Incremental Static Regeneration (ISR). The header acts as a boolean flag, signaling the response body comes from a pre-rendered page rather than server-side rendering on each request. Next.js emits the header from the App Router static export pipeline, so its presence also confirms the route runs on the App Router. Pages Router routes render statically without sending this header.
This header is useful for verifying a page is being served from the static Caching layer. When paired with X-Nextjs-Cache, the two headers provide a complete picture of pre-rendering status and cache freshness. On Vercel-hosted deployments, X-Vercel-Cache and X-Vercel-Id add CDN-level detail to the diagnostic chain.
Values
1
The value 1 is a boolean true indicator. The page
was pre-rendered by Next.js through SSG or ISR. This
is the only value the header carries in practice.
Example
A statically generated page returns the header with
value 1, confirming the response was pre-rendered
at build time or during an ISR cycle rather than
rendered on demand.
X-Nextjs-Prerender: 1
On a Vercel deployment, the X-Nextjs-Prerender header appears alongside other Next.js and Vercel HTTP headers together describing the full request lifecycle. The combination below shows a pre-rendered page served from cache at the Ashburn edge location.
X-Nextjs-Prerender: 1
X-Nextjs-Cache: HIT
X-Vercel-Cache: HIT
X-Vercel-Id: iad1::abcde-1234567890123-abcdef123456
When ISR revalidation is configured, the page is
still marked as pre-rendered even when
X-Nextjs-Cache reports STALE.
The X-Nextjs-Prerender flag indicates how the
page was originally generated, not whether the cached
copy is fresh.
X-Nextjs-Prerender: 1
X-Nextjs-Cache: STALE