Skip to content

Every page inherits canonical "/" from the root layout #115

Closed

Description

@geetxnshgoyal

Problem

app/layout.tsx sets

alternates: { canonical: "/" },

in the root metadata. Next.js merges metadata downward, so every page that doesn't set its own canonical (most of them) tells search engines "I am a duplicate of the home page". That can keep pages like /gsoc and /blog/<post> out of search results.

Done when

  • The root layout no longer sets alternates.canonical. Keep it on the home page only: move it to app/page.tsx's metadata, or drop it.
  • Spot-check with view-source on /, /gsoc and one blog post: none of them may claim <link rel="canonical" href="https://www.devforge.club/"> except /.
  • npm run build passes.

Size: ~3–6 lines. Small diff, real impact: explain in the PR why it matters.


Taking this? Comment /assign and the bot assigns you if it's free. One issue per person at a time; comment /unassign to hand it back. That's milestone 2 of the 10 PR Journey. Setup, the checks CI runs, and how to open the PR from your fork are in CONTRIBUTING.md. Put Fixes #<this issue> in your PR description.

Activity

  1. added
    bugSomething isn't working
    seoMetadata, sitemap, search
    on Sep 21, 2026
  2. drathava847-beep commented on Sep 22, 2026

    @drathava847-beep
    Contributor

    @geetxnshgoyal assign this issue to me.

  3. github-actions commented on Sep 23, 2026

    @github-actions

    @hridhinvarkeyjoseph this one is already taken by @drathava847-beep. Pick another from the unassigned good first issues.

  4. added a commit that references this issue on Sep 26, 2026
    6788c45
  5. added a commit that references this issue on Sep 28, 2026
    7c4dd8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingseoMetadata, sitemap, search

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions