# @next/next/no-script-component-in-head

> Disallow `<Script>` as a child of `Head` from `next/head`

`Head` from `next/head` is for plain tags such as `<title>`, `<meta>` and `<link>`. The `Script` component from `next/script` doesn't work inside it. `Script` decides where its tag goes, so put it anywhere else in the page.

The rule reports a `<Script>` that's a direct child of the default import of `next/head`.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"@next/next/no-script-component-in-head" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad */}
```jsx
import Head from "next/head";
import Script from "next/script";

export default function Home() {
  return (
    <Head>
      <title>Home</title>
      <Script src="https://example.com/widget.js" />
    </Head>
  );
}
```

Not reported:

{/* good */}
```jsx
import Head from "next/head";
import Script from "next/script";

export default function Home() {
  return (
    <>
      <Head>
        <title>Home</title>
      </Head>
      <Script src="https://example.com/widget.js" />
    </>
  );
}
```
