nextjs - 💡(How to fix) Fix Home route "/" is also accessible via "/index" automatically on Vercel [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#87275Fetched 2026-04-08 02:07:25
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×2issue_type_added ×1labeled ×1subscribed ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8112
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 23.11.0
  npm: 10.9.2
  Yarn: 1.22.19
  pnpm: 10.3.0
Relevant Packages:
  next: 16.0.10 // Latest available version is detected (16.0.10).
  eslint-config-next: N/A
  react: 19.2.1
  react-dom: 19.2.1
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/mikkeldamm/home-index-route

To Reproduce

The issue only exists on Vercel, but if you visit this url: https://home-index-route.vercel.app/ And this url: https://home-index-route.vercel.app/index

Then they are the same route, but nothing in the application is setup to listen for "index"

The issue exist in both the app and pages router

Current vs. Expected behavior

I would expect the /index route to return 404 like it does when running next dev or next build && next start (locally)

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8112
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 23.11.0
  npm: 10.9.2
  Yarn: 1.22.19
  pnpm: 10.3.0
Relevant Packages:
  next: 16.0.10 // Latest available version is detected (16.0.10).
  eslint-config-next: N/A
  react: 19.2.1
  react-dom: 19.2.1
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Linking and Navigating

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

Vercel (Deployed)

Additional context

No response

extent analysis

TL;DR

The issue can likely be resolved by configuring Next.js to handle the /index route correctly on Vercel.

Guidance

  • Verify that the next.config.js file is properly configured to handle route aliases or redirects, as the issue seems to be related to routing.
  • Check the Vercel configuration to ensure that it is set up to handle Next.js routes correctly, as the issue only occurs on Vercel.
  • Review the pages directory to ensure that there are no conflicting route definitions that could be causing the issue.
  • Consider adding a custom route or redirect in next.config.js to handle the /index route explicitly.

Example

No code example is provided as the issue is more related to configuration and setup.

Notes

The issue seems to be specific to Vercel and may require additional configuration or setup to resolve. It's also possible that there is a version-specific issue with Next.js or Vercel that is causing the problem.

Recommendation

Apply workaround: The best course of action is to apply a workaround, such as adding a custom route or redirect in next.config.js, to handle the /index route explicitly, as the issue is likely related to a configuration or setup problem rather than a version-specific issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Home route "/" is also accessible via "/index" automatically on Vercel [2 comments, 3 participants]