10000 Soft 404 on Dynamic routes (Googlebot indexing) · Issue #79942 · vercel/next.js · GitHub
[go: up one dir, main page]

Skip to content

Soft 404 on Dynamic routes (Googlebot indexing) #79942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gmoigneu opened this issue May 29, 2025 · 0 comments
Open

Soft 404 on Dynamic routes (Googlebot indexing) #79942

gmoigneu opened this issue May 29, 2025 · 0 comments
Labels
Dynamic Routes Related to dynamic routes.

Comments

@gmoigneu
Copy link
gmoigneu commented May 29, 2025

Link to the code that reproduces this issue

https://github.com/gmoigneu/nextjs15-dynamic-routes-soft-404

To Reproduce

  1. Deploy a Next.js 15 app with some dynamic routing (app/[slug]/page.tsx for example)
  2. Create the production build
  3. Deploy and run
  4. Googlebot will tag all these pages as Soft 404. Not indexing them.

Current vs. Expected behavior

Dynamic routes served with SSR should be indexed by Googlebot and not be tagged as Soft 404.

The culprit is Next.js’s Image and Link components. On dynamic routes, these components are causing server-side rendering (SSR) failures, leading to soft 404s but only on dynamic routes. The Image component, reliant on Vercel’s image optimization, fails to render images during SSR, possibly due to a runtime change. The Link component’s prefetching is breaking SSR when resolving dynamic hrefs.

See the following blog post for the bug explanation: https://www.academicjobs.com/dyn/failing-dynamic-routes-in-next-js

Making sure the chunks are not indexed by Googlebot in robots.txt fixed the issue:

Disallow: /_next/static/chunks/app/

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:29 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: 4.5.1
  pnpm: N/A
Relevant Packages:
  next: 15.4.0-canary.56 // Latest available version is detected (15.4.0-canary.56).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Dynamic Routes

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

@github-actions github-actions bot added the Dynamic Routes Related to dynamic routes. label May 29, 2025
@gmoigneu gmoigneu changed the title Next.js 15 Soft 404 on Googlebot indexing Next.js 15 Soft 404 on Dynamic routes (Googlebot indexing) May 29, 2025
@gmoigneu gmoigneu changed the title Next.js 15 Soft 404 on Dynamic routes (Googlebot indexing) Soft 404 on Dynamic routes (Googlebot indexing) May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dynamic Routes Related to dynamic routes.
Projects
None yet
Development

No branches or pull requests

1 participant
0