Skip to content

Duplicate metatags when using next/head in pages router #81655

@sommeeeer

Description

@sommeeeer

Link to the code that reproduces this issue

https://github.com/sommeeeer/next-head-duplicate-metatags

To Reproduce

  1. pnpm build && pnpm start
  2. Visit http://localhost:3000/head
  3. Inspect <head> and see duplicate meta tags.

Current vs. Expected behavior

I expect it to work like on 15.3.x. Without duplicate meta tags in <head>.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #63-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 19:04:15 UTC 2025
  Available memory (MB): 14800
  Available CPU cores: 16
Binaries:
  Node: 20.18.0
  npm: 11.4.1
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 15.4.2-canary.0 // Latest available version is detected (15.4.2-canary.0).
  eslint-config-next: 15.4.1
  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)

Pages Router

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

next start (local), next dev (local)

Additional context

I tested on latest canary 15.4.2-canary.0. Issue still persists there. Somewhere in the render process the head tags get duplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions