# no-title-in-document-head

Rule `nextjs/no-title-in-document-head`. Prevent usage of `<title>` with `Head` component from `next/document`.

- Source: nextjs
- Technologies: Next.js, React
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 99.7M weekly downloads of presets that enable it
- Trend: +49.8% last quarter
- Rank: #170 by reach, #837 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@next/next/no-title-in-document-head` | yes | no | package `@next/eslint-plugin-next` | [docs](https://nextjs.org/docs/messages/no-title-in-document-head) |
| Oxlint | `nextjs/no-title-in-document-head` | no | no | plugin `nextjs`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/nextjs/no-title-in-document-head.html) |

## Code examples

### Incorrect: the rule reports this

```js
import {Head} from 'next/document'

export function Home() {
  return (
    <div>
      <Head>
        <title>My page title</title>
      </Head>
    </div>
  )
}
```

### Correct: the rule accepts this

```js
import Head from 'next/head'

export function Home() {
  return (
    <div>
      <Head>
        <title>My page title</title>
      </Head>
    </div>
  )
}
```

Examples from the Oxlint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import next from "@next/eslint-plugin-next";

export default [
  {
    plugins: { "@next/next": next },
    rules: {
      "@next/next/no-title-in-document-head": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "nextjs"
  ],
  "rules": {
    "nextjs/no-title-in-document-head": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Next.js recommended](https://lintradar.dev/presets/next-recommended.md) | ESLint | `@next/eslint-plugin-next` | 22 | 52.9M | +50.7% |
| [Next.js Core Web Vitals](https://lintradar.dev/presets/next-core-web-vitals.md) | ESLint | `eslint-config-next` | 62 | 46.8M | +48.8% |

## Related rules

- [nextjs/no-styled-jsx-in-document](https://lintradar.dev/rules/nextjs/no-styled-jsx-in-document.md): Prevent usage of `styled-jsx` in `pages/_document.js`.
- [nextjs/no-typos](https://lintradar.dev/rules/nextjs/no-typos.md): Prevent common typos in Next.js data fetching functions.
- [nextjs/no-script-component-in-head](https://lintradar.dev/rules/nextjs/no-script-component-in-head.md): Prevent usage of `next/script` in `next/head` component.
- [nextjs/no-location-assign-relative-destination](https://lintradar.dev/rules/nextjs/no-location-assign-relative-destination.md): Prevent usage of `location.assign` or `location.href` assignment to navigate to internal Next.js pages.
- [nextjs/no-page-custom-font](https://lintradar.dev/rules/nextjs/no-page-custom-font.md): Prevent page-only custom fonts.
- [nextjs/no-html-link-for-pages](https://lintradar.dev/rules/nextjs/no-html-link-for-pages.md): Prevent usage of `<a>` elements to navigate to internal Next.js pages.

---

Web page: https://lintradar.dev/rules/nextjs/no-title-in-document-head. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
