Skip to content
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

Duplicate Home Page URLs: / and /index Both Accessible #3264

Open
Tracked by #2600
AntoineKM opened this issue Sep 18, 2024 · 1 comment
Open
Tracked by #2600

Duplicate Home Page URLs: / and /index Both Accessible #3264

AntoineKM opened this issue Sep 18, 2024 · 1 comment

Comments

@AntoineKM
Copy link
Contributor

When using Nextra to create a home page, an /index.mdx file is required to define the content. This setup results in two accessible URLs leading to the same content:

  • https://nextra.site/
  • https://nextra.site/index

This duplication can be confusing and may lead to potential SEO issues or unwanted behavior.

Steps to Reproduce

  1. Create a new Nextra site or use an existing one.
  2. Add an index.mdx file to define the home page content.
  3. Access the home page via both https://nextra.site/ and https://nextra.site/index.

Expected Behavior

Only one URL should be accessible for the home page content, preferably https://nextra.site/.

Actual Behavior

Both https://nextra.site/ and https://nextra.site/index show the same home page content, leading to duplicate content accessibility.

Suggested Solution

Consider implementing a redirect or a mechanism to ensure that only one URL (e.g., https://nextra.site/) is accessible for the home page, and the other URL (https://nextra.site/index) is redirected or results in a 404 error.

@dimaMachina
Copy link
Collaborator

I think it’s an upstream issue from Next.js? Should be fixed with app router migration in Nextra 4

@dimaMachina dimaMachina mentioned this issue Oct 1, 2024
46 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants