---
title: "Nuxt Hooks · Nuxt Robots · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/robots/api/nuxt-hooks"
last_updated: "2026-08-15T11:00:25.730Z"
meta:
  description: "Learn how to use Nuxt hooks to modify the robots config."
  "og:description": "Learn how to use Nuxt hooks to modify the robots config."
  "og:title": "Nuxt Hooks · Nuxt Robots · Nuxt SEO"
---

Nuxt SEO on GitHub

Switch to RobotsSwitch to Nuxt SEOSwitch to SitemapSwitch to OG ImageSwitch to Schema.orgSwitch to Link CheckerSwitch to SEO UtilsSwitch to Site ConfigSwitch to Skew ProtectionSwitch to AI Ready

**Nuxt API**

# **Nuxt Hooks**

## `**'robots:config'**`

**Type:** `**(config: ResolvedModuleOptions) => void | Promise<void>**`

This hook allows you to modify the robots config before it is used to generate the robots.txt and meta tags.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  hooks: {
    'robots:config': (config) => {
      // modify the config
      config.sitemap = '/sitemap.xml'
    },
  },
})
```

**Was this page helpful?**

### **Related **

[**Nitro Hooks**](https://nuxtseo.com/docs/robots/nitro-api/nitro-hooks)

[**Nuxt Config**](https://nuxtseo.com/docs/robots/api/config)

[**Nuxt Hooks**](https://nuxtseo.com/docs/sitemap/api/nuxt-hooks)

[**Nuxt Config** Learn how to configure Nuxt Robots using nuxt.config.](https://nuxtseo.com/docs/robots/api/config) [**useBotDetection()** A reactive composable for detecting and classifying bots with optional client-side fingerprinting.](https://nuxtseo.com/docs/robots/api/use-bot-detection)