---
title: "next/head in the App Router (next/no-head-in-app)"
description: "next/head is a Pages Router API; in app/ it renders nothing into <head>."
url: http://localhost:4173/rules/next/no-head-in-app
updated: 2026-11-11
---

# next/head in the App Router

> `next/no-head-in-app` is a vetd rule. It flags: next/head in the App Router. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `next/no-head-in-app` |
| Severity | warning |
| Group | Next.js 16 upgrade |
| Tags | nextjs-16, seo, correctness |

## Why it matters

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

## How to fix it

Export `metadata` or `generateMetadata` from the page or layout.

## Credit

Based on work by:

- [Next.js team](https://nextjs.org): The App Router replaces next/head with the Metadata API (metadata and generateMetadata exports).

## References

- [Metadata and OG images](https://nextjs.org/docs/app/getting-started/metadata-and-og-images), Next.js
- [generateMetadata](https://nextjs.org/docs/app/api-reference/functions/generate-metadata), Next.js
- [How to migrate from Pages to the App Router](https://nextjs.org/docs/app/guides/migrating/app-router-migration), Next.js

## Related rules

- [`next/missing-metadata`](http://localhost:4173/rules/next/missing-metadata.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "next/no-head-in-app" }`. CLI: `npx vetd explain next/no-head-in-app`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`next/sync-dynamic-api`](http://localhost:4173/rules/next/sync-dynamic-api.md) · Next: [`next/server-action-auth`](http://localhost:4173/rules/next/server-action-auth.md)
