Nuxt Config · Nuxt Robots · Nuxt SEO

[NuxtSEO](https://nuxtseo.com/ "Home")

- [Modules](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Tools](https://nuxtseo.com/tools)
- [Pro](https://nuxtseo.com/pro)
- [Learn SEO](https://nuxtseo.com/learn-seo/nuxt) [Releases](https://nuxtseo.com/releases)

[1.4K](https://github.com/harlan-zw/nuxt-seo)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

[User Guides](https://nuxtseo.com/docs/robots/getting-started/introduction)

[API](https://nuxtseo.com/docs/robots/api/use-robots-rule)

[Releases](https://nuxtseo.com/docs/robots/releases/v6)

Robots

- [Switch to Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [Switch to OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Switch to Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Switch to Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [Switch to SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Switch to Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Switch to Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [Switch to AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

Search…```k`` /`

v6.0.6

- Playgrounds
- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Nuxt API

- [`useRobotsRule()`](https://nuxtseo.com/docs/robots/api/use-robots-rule)
- [`useBotDetection()`](https://nuxtseo.com/docs/robots/api/use-bot-detection)
- [nuxt.config.ts](https://nuxtseo.com/docs/robots/api/config)
- [Nuxt Hooks](https://nuxtseo.com/docs/robots/api/nuxt-hooks)

### Nitro API

- [`getPathRobotConfig()`](https://nuxtseo.com/docs/robots/nitro-api/get-path-robot-config)
- [`getSiteRobotConfig()`](https://nuxtseo.com/docs/robots/nitro-api/get-site-robot-config)
- [`getBotDetection()`](https://nuxtseo.com/docs/robots/nitro-api/get-bot-detection)
- [Nitro Hooks](https://nuxtseo.com/docs/robots/nitro-api/nitro-hooks)

Nuxt API

# Nuxt Config

[Copy for LLMs](https://nuxtseo.com/docs/robots/api/config.md)

## [`enabled: boolean`](#enabled-boolean)

- Default: `true`

Conditionally toggle the module.

## [`allow: string\[\]`](#allow-string)

- Default: `[]`

Allow paths to be indexed for the `*` user-agent (all robots).

## [`disallow: string\[\]`](#disallow-string)

- Default: `[]`

Disallow paths from being indexed for the `*` user-agent (all robots).

## [`header: boolean`](#header-boolean)

- Default: `true`

Should a `X-Robots-Tag` header be added to the response.

## [`metaTag: boolean`](#metatag-boolean)

- Default: `true`

Whether to add a `<meta name="robots" ...>` tag to the `<head>` of each page.

## [`groups: RobotsGroupInput\[\]`](#groups-robotsgroupinput)

- Default: `[]`

Define more granular rules for the robots.txt. Each group is a set of rules for specific user agent(s).

```
export default defineNuxtConfig({
  robots: {
    groups: [
      {
        userAgent: ['AdsBot-Google-Mobile', 'AdsBot-Google-Mobile-Apps'],
        disallow: ['/admin'],
        allow: ['/admin/login'],
        contentUsage: { 'bots': 'y', 'train-ai': 'n' },
        contentSignal: { 'ai-train': 'no', 'search': 'yes' },
        comment: 'Allow Google AdsBot to index the login page but no-admin pages'
      },
    ]
  }
})
```

### [Group Configuration Options](#group-configuration-options)

Each group object supports the following properties:

- `userAgent?: string | string[]` - The user agent(s) to apply rules to. Defaults to `['*']`
- `disallow?: string | string[]` - Paths to disallow for the user agent(s)
- `allow?: string | string[]` - Paths to allow for the user agent(s)
- `contentUsage?: string | string[] | Partial<ContentUsagePreferences>` - IETF Content-Usage directives for AI preferences. Valid categories: `bots`, `train-ai`, `ai-output`, `search`. Values: `y`/`n`. Use object format for type safety (see [AI Directives guide](https://nuxtseo.com/docs/robots/guides/ai-directives))
- `contentSignal?: string | string[] | Partial<ContentSignalPreferences>` - Cloudflare Content-Signal directives for AI preferences. Valid categories: `search`, `ai-input`, `ai-train`. Values: `yes`/`no`. Use object format for type safety (see [AI Directives guide](https://nuxtseo.com/docs/robots/guides/ai-directives))
- `comment?: string | string[]` - Comments to include in the robots.txt file

## [`autoI18n: false | AutoI18nConfig`](#autoi18n-false-autoi18nconfig)

- Default: `undefined`

Override the auto i18n configuration.

## [`sitemap: MaybeArray<string>`](#sitemap-maybearraystring)

- Default: `[]`

The sitemap URL(s) for the site. If you have multiple sitemaps, you can provide an array of URLs.

You must either define the runtime config `siteUrl` or provide the sitemap as absolute URLs.

```
export default defineNuxtConfig({
  robots: {
    sitemap: [
      '/sitemap-one.xml',
      '/sitemap-two.xml',
    ],
  },
})
```

## [`robotsEnabledValue: string`](#robotsenabledvalue-string)

- Default: `'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'`

The value to use when the page is indexable.

## [`robotsDisabledValue: string`](#robotsdisabledvalue-string)

- Type: `string`
- Default: `'noindex, nofollow'`

The value to use when the page is not indexable.

## [`mergeWithRobotsTxtPath: boolean| string`](#mergewithrobotstxtpath-boolean-string)

- Default: `true`

Specify a robots.txt path to merge the config from, relative to the root directory.

When set to `true`, the default path of `<publicDir>/robots.txt` will be used.

When set to `false`, no merging will occur.

## [`blockNonSeoBots: boolean`](#blocknonseobots-boolean)

- Default: `false`

Blocks some non-SEO bots from crawling your site. This is not a replacement for a full-blown bot management solution, but it can help to reduce the load on your server.

See [const.ts](https://github.com/nuxt-modules/robots/blob/main/src/const.ts) for the list of bots that are blocked.

```
export default defineNuxtConfig({
  robots: {
    blockNonSeoBots: true
  }
})
```

## [`blockAiBots: boolean`](#blockaibots-boolean)

- Default: `false`

Blocks AI crawlers from crawling your site. This adds a rule group disallowing `/` for known AI bots defined in the `AiBots` constant.

```
export default defineNuxtConfig({
  robots: {
    blockAiBots: true
  }
})
```

## [`robotsTxt: boolean`](#robotstxt-boolean)

- Default: `true`

Whether to generate a `robots.txt` file. Useful for disabling when using a base URL.

## [`cacheControl: string| false`](#cachecontrol-string-false)

- Default: `'max-age=14400, must-revalidate'`

Configure the Cache-Control header for the robots.txt file. By default it's cached for 4 hours and must be revalidated.

Providing false will set the header to `'no-store'`.

nuxt.config.ts

```
export default defineNuxtConfig({
  robots: {
    cacheControl: 'max-age=14400, must-revalidate'
  }
})
```

## [`disableNuxtContentIntegration: boolean`](#disablenuxtcontentintegration-boolean)

- Default: `undefined`

Whether to disable the [Nuxt Content Integration](https://nuxtseo.com/docs/robots/advanced/content).

## [`debug: boolean`](#debug-boolean)

- Type: `boolean`
- Default: `false`

Enables debug logs and a debug endpoint.

## [`credits: boolean`](#credits-boolean)

- Default: `true`

Control the module credit comment in the generated robots.txt file.

robots.txt

```
# START nuxt-robots (indexable) <- credits
# ...
# END nuxt-robots <- credits
```

nuxt.config.ts

```
export default defineNuxtConfig({
  robots: {
    credits: false
  }
})
```

## [`disallowNonIndexableRoutes: boolean`](#disallownonindexableroutes-boolean)

**⚠️ Deprecated**: Explicitly disallow routes in the `/robots.txt` file if you don't want them to be accessible.

- Default: `false`

Should route rules which disallow indexing be added to the `/robots.txt` file.

## [`botDetection: boolean`](#botdetection-boolean)

- Default: `true`

Enable bot detection plugin. When disabled, no bot detection is performed.

[Edit this page](https://github.com/nuxt-modules/robots/edit/main/docs/content/3.api/1.config.md)

[Markdown For LLMs](https://nuxtseo.com/docs/robots/api/config.md)

Did this page help you?

[useRobotsRule() A reactive way to access and set the robots rule.](https://nuxtseo.com/docs/robots/api/use-robots-rule) [Nuxt Hooks Learn how to use Nuxt hooks to modify the robots config.](https://nuxtseo.com/docs/robots/api/nuxt-hooks)

On this page

- [enabled: boolean](#enabled-boolean)
- [allow: string\[\]](#allow-string)
- [disallow: string\[\]](#disallow-string)
- [header: boolean](#header-boolean)
- [metaTag: boolean](#metatag-boolean)
- [groups: RobotsGroupInput\[\]](#groups-robotsgroupinput)
- [autoI18n: false | AutoI18nConfig](#autoi18n-false-autoi18nconfig)
- [sitemap: MaybeArray<string>](#sitemap-maybearraystring)
- [robotsEnabledValue: string](#robotsenabledvalue-string)
- [robotsDisabledValue: string](#robotsdisabledvalue-string)
- [mergeWithRobotsTxtPath: boolean | string](#mergewithrobotstxtpath-boolean-string)
- [blockNonSeoBots: boolean](#blocknonseobots-boolean)
- [blockAiBots: boolean](#blockaibots-boolean)
- [robotsTxt: boolean](#robotstxt-boolean)
- [cacheControl: string | false](#cachecontrol-string-false)
- [disableNuxtContentIntegration: boolean](#disablenuxtcontentintegration-boolean)
- [debug: boolean](#debug-boolean)
- [credits: boolean](#credits-boolean)
- [disallowNonIndexableRoutes: boolean](#disallownonindexableroutes-boolean)
- [botDetection: boolean](#botdetection-boolean)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

### [NuxtSEO](https://nuxtseo.com/ "Home")

- [Getting Started](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [MCP](https://nuxtseo.com/docs/nuxt-seo/guides/mcp)

Modules

- [Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

### [NuxtSEO Pro](https://nuxtseo.com/pro "Home")

- [Getting Started](https://nuxtseo.com/pro)
- [Dashboard](https://nuxtseo.com/pro/dashboard)
- [Pro MCP](https://nuxtseo.com/docs/nuxt-seo-pro/mcp/installation)

### [Learn SEO](https://nuxtseo.com/learn-seo "Learn SEO")

Nuxt

- [Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers)
- [Launch & Listen](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen)
- [Routes & Rendering](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering)
- [Staying Secure](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/security)

Vue

- [Vue SEO Guide](https://nuxtseo.com/learn-seo/vue)
- [Mastering Meta](https://nuxtseo.com/learn-seo/vue/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/vue/controlling-crawlers)
- [SPA SEO](https://nuxtseo.com/learn-seo/vue/spa)
- [SSR Frameworks](https://nuxtseo.com/learn-seo/vue/ssr-frameworks)
- [SEO Checklist](https://nuxtseo.com/learn-seo/checklist)
- [Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup)
- [Backlinks & Authority](https://nuxtseo.com/learn-seo/backlinks)

### [Tools](https://nuxtseo.com/tools "SEO Tools")

- [Social Share Debugger](https://nuxtseo.com/tools/social-share-debugger)
- [Robots.txt Generator](https://nuxtseo.com/tools/robots-txt-generator)
- [Meta Tag Checker](https://nuxtseo.com/tools/meta-tag-checker)
- [HTML to Markdown](https://nuxtseo.com/tools/html-to-markdown)
- [XML Sitemap Validator](https://nuxtseo.com/tools/xml-sitemap-validator)
- [Schema.org Validator](https://nuxtseo.com/tools/schema-validator)
- [Keyword Idea Generator](https://nuxtseo.com/tools/keyword-generator)
- [Keyword Research](https://nuxtseo.com/tools/keyword-research)
- [SERP Analyzer](https://nuxtseo.com/tools/serp-analyzer)
- [Domain Rankings](https://nuxtseo.com/tools/domain-rankings)

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)