Link to the code that reproduces this issue
https://github.com/lmounsey/cache-components-dynamic-routes
To Reproduce
- Build the application using
next build
- Start application server using
next start
- Visit invalid page route, e.g. http://localhost:3000/this-page-does-not-exist
- See 200 response
Current vs. Expected behavior
In 16.2.x dynamic routes that are invalid correctly return a 404 response on first render when using cacheComponents.
There seems to be a change/regression with 16.3.x, where it looks like it first returns a static shell (200 response) on first load. Once cached, the page then correctly returns a 404 response.
I would expect the page to return a 404 on first render, otherwise this could have an impact on SEO, reporting and monitoring.
We rely on dynamic routes so new content can be published from the CMS instantly.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:13 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8122
Available memory (MB): 24576
Available CPU cores: 8
Binaries:
Node: 25.2.1
npm: 11.6.2
Yarn: 1.22.22
pnpm: 10.17.1
Relevant Packages:
next: 16.3.0-canary.73 // Latest available version is detected (16.3.0-canary.73).
eslint-config-next: N/A
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
cacheComponents, Error Handling
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
This can only be replicated using next build + next start.
next dev returns the correct status code on first render.
I have not tested this deployed to Vercel, it only came up as it's not passing our internal e2e tests.
Link to the code that reproduces this issue
https://github.com/lmounsey/cache-components-dynamic-routes
To Reproduce
next buildnext startCurrent vs. Expected behavior
In
16.2.xdynamic routes that are invalid correctly return a 404 response on first render when usingcacheComponents.There seems to be a change/regression with
16.3.x, where it looks like it first returns a static shell (200 response) on first load. Once cached, the page then correctly returns a 404 response.I would expect the page to return a 404 on first render, otherwise this could have an impact on SEO, reporting and monitoring.
We rely on dynamic routes so new content can be published from the CMS instantly.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.6.0: Mon Jan 19 22:01:13 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T8122 Available memory (MB): 24576 Available CPU cores: 8 Binaries: Node: 25.2.1 npm: 11.6.2 Yarn: 1.22.22 pnpm: 10.17.1 Relevant Packages: next: 16.3.0-canary.73 // Latest available version is detected (16.3.0-canary.73). eslint-config-next: N/A react: 19.2.4 react-dom: 19.2.4 typescript: 5.9.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
cacheComponents, Error Handling
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
This can only be replicated using
next build+next start.next devreturns the correct status code on first render.I have not tested this deployed to Vercel, it only came up as it's not passing our internal e2e tests.