---
title: "Nuxt Sitemap v9.0.0"
description: "Release notes for v9.0.0 of Nuxt Sitemap."
canonical_url: "https://nuxtseo.com/docs/sitemap/releases/v9"
---

## Introduction

Nuxt Sitemap v9 moves the module to Nuxt 4.6 and Nuxt 5. Server code now uses the portable `nuxt/server` APIs.

v9 ships in [Nuxt SEO v6](/docs/nuxt-seo/releases/v6). If you use `@nuxtjs/seo`, follow the [Nuxt SEO v5 to v6 migration guide](/docs/nuxt-seo/migration-guide/v5-to-v6).

Read the breaking changes below, then follow the [upgrade steps](#upgrading).

## ⚠️ Breaking Changes

### Nuxt 4.6 and Node 22

v9 requires Nuxt `^4.6.0 || ^5.0.0`. Nuxt 3 and Nuxt 4 releases before 4.6 are not supported.
The Node engine range is `^22.22.3 || ^24.15.0 || >=26.0.0`. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

### Server events use `RequestEvent`

Sitemap Nitro hooks receive a `RequestEvent` from `nuxt/server`. This covers `sitemap:input`, `sitemap:resolved`, `sitemap:index-resolved`, `sitemap:sitemaps-resolved`, `sitemap:output` and `sitemap:sources`. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

The `RequestEvent` type has no `event.node` property. Read headers from the web `Request`:

```diff
nitroApp.hooks.hook('sitemap:sources', async (ctx) => {
-  const authHeader = ctx.event.node.req.headers.authorization
+  const authHeader = ctx.event.req.headers.get('authorization')
 })
```

### Import server helpers from `#sitemap/server`

`defineSitemapEventHandler()` and `asSitemapUrl()` have a typed public import path. Server auto imports still resolve both names.

```diff
-import { defineSitemapEventHandler } from '#imports'
+import { defineSitemapEventHandler } from '#sitemap/server'
```

`defineSitemapEventHandler()` now wraps `defineEventHandler()` from `nuxt/server`. Its `event` is a `RequestEvent`. Use request utilities from `nuxt/server`, such as `getQuery()`.

### Nuxt Robots v7 and Nuxt Site Config v5

v9 loads [Nuxt Site Config v5](/docs/site-config/releases/v5) through Nuxt module dependencies. ([#695](https://github.com/nuxt-modules/sitemap/pull/695))

If you use Nuxt Robots, upgrade it to [v7](/docs/robots/releases/v7). The sitemap reads robots rules from `#robots/server`. The module no longer detects the legacy `nuxt-simple-robots` package. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

### Nuxt Content v2 removed

v9 supports Nuxt Content v3 only. The `strictNuxtContentPaths` option and the `@nuxt/content@v2:urls` app source are removed. ([#698](https://github.com/nuxt-modules/sitemap/pull/698))

If you use Nuxt Content v2, upgrade to Nuxt Content v3. Then add `defineSitemapSchema()` to each page collection. See [Nuxt Content](/docs/sitemap/guides/content).

### Zod 4 for content schemas

The optional `zod` peer is now `^4.6.5`. If you use `defineSitemapSchema()`, install Zod 4.6.5 or a later 4.x release. The Zod 3 mismatch warning is removed. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

### DevTools needs `nuxtseo-devtools-host`

The DevTools panel moved to an optional package. Install it as a dev dependency:

```bash
pnpm add -D nuxtseo-devtools-host
```

Restart the dev server after you install it. You do not add the package to `modules`. Without it, the Sitemap tab shows an install button.

## 🚀 New Features

### Typed `#sitemap/server` imports

Server helpers and types now have one typed import path. The alias works on Nuxt 4.6 and Nuxt 5. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

```ts [server/api/__sitemap__/urls.ts]
import type { SitemapUrlInput } from '#sitemap/server'
import { defineSitemapEventHandler } from '#sitemap/server'
import { getQuery } from 'nuxt/server'

export default defineSitemapEventHandler((event) => {
  const { lang } = getQuery(event)
  return [{ loc: `/${lang}/about` }] satisfies SitemapUrlInput[]
})
```

## 🐛 Bug Fixes

- Prerendered dynamic pages with `definePageMeta({ sitemap: false })` are now excluded. ([#691](https://github.com/nuxt-modules/sitemap/pull/691))
- Page exclusions use the app router matcher. They respect `sensitive`, `strict` and `end`, nested routes and page aliases. ([#692](https://github.com/nuxt-modules/sitemap/pull/692))
- Nuxt 5 development no longer blocks on page resolution. Sitemap sources reload when pages change. ([#688](https://github.com/nuxt-modules/sitemap/pull/688))
- Local source requests keep authentication headers and query options during HTTP rendering and static generation. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))
- Robots restrictions on a staging site no longer empty the sitemap. Explicit global and route `noindex` headers still exclude URLs. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

## ⚡ Performance

- When `experimentalStreaming` and `experimentalCompression` are off, the build removes their code. In one measured app, total server JavaScript fell from 2,054,112 to 2,046,716 bytes. ([#690](https://github.com/nuxt-modules/sitemap/pull/690))
- `pathe` and `pkg-types` are no longer direct dependencies. ([#687](https://github.com/nuxt-modules/sitemap/pull/687))

## Upgrading

1. Upgrade to Nuxt 4.6 or Nuxt 5. Use Node 22.22.3+, 24.15.0+, or 26+.
2. If you use `@nuxtjs/seo`, upgrade it to v6. Nuxt SEO v6 includes Sitemap v9.
3. Otherwise, install `@nuxtjs/sitemap` v9. If you use `@nuxtjs/robots`, upgrade it to v7.
4. In sitemap hooks and handlers, replace `event.node.req` with `event.req`.
5. Import `defineSitemapEventHandler()` and `asSitemapUrl()` from `#sitemap/server`.
6. If you use Nuxt Content v2, upgrade to Nuxt Content v3. Remove `strictNuxtContentPaths`.
7. If you use the DevTools Sitemap tab, run `pnpm add -D nuxtseo-devtools-host`.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
