---
title: "Nuxt Hooks"
description: "Learn how to use Nuxt hooks to modify the robots config."
canonical_url: "https://nuxtseo.com/docs/robots/api/nuxt-hooks"
last_updated: "2026-05-25T06:21:54.494Z"
---

## `'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.

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