next/head in the App Router

next/no-head-in-appwarningnextjs-16seocorrectness

Why it matters

next/head is a Pages Router API; in app/ it renders nothing into <head>.

Fix

Export metadata or generateMetadata from the page or layout.

Credit

  • From the Next.js team

    The App Router replaces next/head with the Metadata API (metadata and generateMetadata exports).

References