Nuxt 4.6+ or Nuxt 5 app
- Starting point
- Use the current
@nuxtjs/sitemapmodule (v9) - Critical check
- Check module output for routes from the CMS and runtime data
Set up a Nuxt sitemap for SSR or static hosting, include real public routes, and verify the deployed XML before submitting it.
Install @nuxtjs/sitemap with npx nuxt module add sitemap, set your production site URL, then inspect the generated sitemap and any split files. Module v9 requires Nuxt 4.6 or later; older Nuxt needs an earlier module line. For a custom route, prerender it if you deploy statically. List canonical, public pages only and verify each URL on the deployed domain.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
@nuxtjs/sitemap module (v9)latest-8 and latest-7 exist) and read its requirements firstpackage.json requires Nuxt ^4.6.0 || ^5.0.0/sitemap.xml to Nitro prerender routesnuxt-community/sitemap-module documentationThe current Nuxt module supports one sitemap or multiple named sitemaps, and can fetch URLs from other sources. If you have custom routes or a headless CMS, map the public URL inventory deliberately rather than assuming the router knows every record.
From a Nuxt 4.6 or later project, run npx nuxt module add sitemap. The v9 module also requires Node 22.22.3 or later, 24.15.0 or later, or 26 or later. Use the Nuxt 2 module documentation if your project is on Nuxt 2.
The module requires a site URL at minimum: set site: { url: 'https://example.com' } in nuxt.config.ts or NUXT_SITE_URL in the environment. Without one, the module docs say the sitemap uses localhost in production. Keep preview and local domains out of generated URLs.
Generate a production build and inspect /sitemap.xml or the index and child files the module creates. Development output does not prove the production host serves the same files.
Open the deployed sitemap without authentication, then submit its index in the matching Search Console property and review fetch errors. Also add it to robots.txt; the module docs recommend the Nuxt Robots module for that.
export default defineNuxtConfig({
nitro: {
prerender: {
routes: ['/sitemap.xml']
}
}
})loc field and optional lastmod, changefreq, and priority.lastmod.See the Nuxt sitemap module, the legacy Nuxt Content v2 sitemap recipe, Google's sitemap guide, and Search Console sitemap submission.
Sample static, CMS, localized, and dynamic pages. Confirm each important public route appears once and has the expected canonical URL.
Fetch the deployed index and each child file. Check status, XML validity, host, redirects, and robots access.
A submitted sitemap helps discovery but does not guarantee indexing. If a listed page is missing from search, inspect canonical selection, crawl access, and page value separately.
3 questions people ask next, answered from the sources on this page.
Use @nuxtjs/sitemap. Its v9 release requires Nuxt 4.6 or later, and Nuxt's module page points Nuxt 2 users to the legacy nuxt-community/sitemap-module documentation.
The sitemap must be given or able to fetch those URLs. Check the module's data sources and confirm the CMS pages are published with canonical production paths.
Only if it is generated as a static route or your host runs the server output. The legacy Nuxt Content v2 recipe says to add the sitemap route to Nitro prerendering when using nuxt generate.
Run the free audit, then approve the fixes. Every change can be undone.