I18n · Nuxt Sitemap · 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/sitemap/getting-started/introduction)

[API](https://nuxtseo.com/docs/sitemap/api/config)

[Releases](https://nuxtseo.com/docs/sitemap/releases/v8)

Sitemap

- [Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Switch to Robots](https://nuxtseo.com/docs/robots/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`` /`

v8.0.13

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

### Getting Started

- [Introduction](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [Installation](https://nuxtseo.com/docs/sitemap/getting-started/installation)
- [Data Sources](https://nuxtseo.com/docs/sitemap/getting-started/data-sources)
- [Troubleshooting](https://nuxtseo.com/docs/sitemap/getting-started/troubleshooting)

### Core Concepts

- [Dynamic URL Endpoints](https://nuxtseo.com/docs/sitemap/guides/dynamic-urls)
- [Disabling Indexing](https://nuxtseo.com/docs/sitemap/guides/filtering-urls)
- [Multi Sitemaps](https://nuxtseo.com/docs/sitemap/guides/multi-sitemaps)
- [I18n](https://nuxtseo.com/docs/sitemap/guides/i18n)
- [Nuxt Content](https://nuxtseo.com/docs/sitemap/guides/content)
- [Nuxt Prerendering](https://nuxtseo.com/docs/sitemap/guides/prerendering)
- [Best Practices](https://nuxtseo.com/docs/sitemap/guides/best-practices)
- [Submitting Your Sitemap](https://nuxtseo.com/docs/sitemap/guides/submitting-sitemap)
- [Zero Runtime](https://nuxtseo.com/docs/sitemap/guides/zero-runtime)

### Advanced

- [Lastmod, Priority, and Changefreq](https://nuxtseo.com/docs/sitemap/advanced/loc-data)
- [Images, Videos, News](https://nuxtseo.com/docs/sitemap/advanced/images-videos)
- [Sitemap Performance](https://nuxtseo.com/docs/sitemap/advanced/performance)
- [Sitemap Chunking](https://nuxtseo.com/docs/sitemap/advanced/chunking-sources)
- [Customising the UI](https://nuxtseo.com/docs/sitemap/advanced/customising-ui)

Core Concepts

# I18n

[Copy for LLMs](https://nuxtseo.com/docs/sitemap/guides/i18n.md)

## [Introduction](#introduction)

The sitemap module automatically integrates with [@nuxtjs/i18n](https://i18n.nuxtjs.org/) and [nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro) without any extra configuration.

While the integration works out of the box, you may need to fine-tune some options depending on your i18n setup.

## [I18n Modes](#i18n-modes)

The module supports two main modes for handling internationalized sitemaps:

### [Automatic I18n Multi Sitemap](#automatic-i18n-multi-sitemap)

The module automatically generates a sitemap for each locale when:

- You're not using the `no_prefix` strategy
- Or you're using [Different Domains](https://i18n.nuxtjs.org/docs/v7/different-domains)

This generates the following structure:

```
./sitemap_index.xml
./en-sitemap.xml
./fr-sitemap.xml
# ...additional locales
```

Key features:

- Includes [app sources](https://nuxtseo.com/docs/sitemap/getting-started/data-sources) automatically
- The `nuxt:pages` source determines the correct `alternatives` for your pages
- To disable app sources, set `excludeAppSources: true`

#### [Custom Sitemaps with I18n](#custom-sitemaps-with-i18n)

You can add custom sitemaps alongside the automatic i18n multi-sitemap. When any sitemap uses `includeAppSources: true`, the module still generates per-locale sitemaps and merges the `exclude`/`include` filters:

nuxt.config.ts

```
export default defineNuxtConfig({
  sitemap: {
    sitemaps: {
      pages: {
        includeAppSources: true,
        exclude: ['/admin/**'],
      },
      posts: {
        sources: ['/api/__sitemap__/posts'],
      }
    }
  }
})
```

This generates:

```
./sitemap_index.xml
./en-pages.xml   # locale sitemap with /admin/** excluded
./fr-pages.xml   # locale sitemap with /admin/** excluded
./posts.xml      # custom sitemap (kept as-is)
```

The sitemap name is preserved with the format `{locale}-{name}`. Sitemaps without `includeAppSources` (like `posts`) remain as separate sitemaps.

### [I18n Pages Mode](#i18n-pages-mode)

When you enable `i18n.pages` in your i18n configuration, the sitemap module generates a single sitemap using that configuration.

Key differences:

- Does not include [app sources](https://nuxtseo.com/docs/sitemap/getting-started/data-sources) automatically
- You can add additional URLs using the `sources` option

## [Dynamic URLs with i18n](#dynamic-urls-with-i18n)

By default, dynamic URLs you provide won't have i18n data and will only appear in the default locale sitemap.

To handle i18n for dynamic URLs, use these special options:

### [1. `_i18nTransform` - Automatic Locale Transformation](#_1-_i18ntransform-automatic-locale-transformation)

Use `_i18nTransform: true` to automatically generate URLs for all locales:

server/api/__sitemap__/urls.ts

```
export default defineSitemapEventHandler(() => {
  return [
    {
      loc: '/about-us',
      // automatically creates: /en/about-us, /fr/about-us, etc.
      _i18nTransform: true,
    }
  ]
})
```

#### [Custom Path Translations](#custom-path-translations)

If you have custom path translations defined in your i18n configuration using `pages`, the `_i18nTransform` option will automatically use them:

nuxt.config.ts

```
export default defineNuxtConfig({
  i18n: {
    pages: {
      about: {
        en: '/about',
        fr: '/a-propos',
        es: '/acerca-de',
      },
      services: {
        en: '/services',
        fr: '/offres',
        es: '/servicios',
      },
    },
  },
})
```

With this configuration, when you set `_i18nTransform: true` on a URL:

server/api/__sitemap__/urls.ts

```
export default defineSitemapEventHandler(() => {
  return [
    {
      loc: '/about', // base path
      _i18nTransform: true,
      // automatically generates:
      // - /about (for en)
      // - /fr/a-propos (for fr)
      // - /es/acerca-de (for es)
    }
  ]
})
```

### [2. `_sitemap` - Specific Locale Assignment](#_2-_sitemap-specific-locale-assignment)

Use `_sitemap` to assign a URL to a specific locale sitemap:

server/api/__sitemap__/urls.ts

```
export default defineSitemapEventHandler(() => {
  return [
    {
      loc: '/about-us',
      // only appears in the English sitemap
      _sitemap: 'en',
    }
  ]
})
```

## [Debugging Hreflang](#debugging-hreflang)

By default, hreflang tags aren't visible in the XML stylesheet view. To see them, you'll need to view the page source.

Note: Search engines can still see these tags even if they're not visible in the stylesheet.

To display hreflang tag counts in the visual interface, customize the columns:

```
export default defineNuxtConfig({
  sitemap: {
    xslColumns: [
      { label: 'URL', width: '50%' },
      { label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
      { label: 'Hreflangs', select: 'count(xhtml:link)', width: '25%' },
    ],
  }
})
```

For more customization options, see the [Customising UI guide](https://nuxtseo.com/docs/sitemap/advanced/customising-ui).

## [Opting Out of I18n Integration](#opting-out-of-i18n-integration)

If you're using `@nuxtjs/i18n` or `nuxt-i18n-micro` but want the sitemap module to ignore it entirely, set `autoI18n: false`. This generates a single sitemap without locale prefixes or hreflang tags.

nuxt.config.ts

```
export default defineNuxtConfig({
  sitemap: {
    autoI18n: false,
  },
})
```

[Edit this page](https://github.com/nuxt-modules/sitemap/edit/main/docs/content/1.guides/3.i18n.md)

[Markdown For LLMs](https://nuxtseo.com/docs/sitemap/guides/i18n.md)

Did this page help you?

### Related

[Data Sources](https://nuxtseo.com/docs/sitemap/getting-started/data-sources) [Dynamic URL Endpoints](https://nuxtseo.com/docs/sitemap/guides/dynamic-urls) [Customising the UI](https://nuxtseo.com/docs/sitemap/advanced/customising-ui)

[Multi Sitemaps Generate multiple sitemaps for different sections of your site.](https://nuxtseo.com/docs/sitemap/guides/multi-sitemaps) [Nuxt Content How to use the Nuxt Sitemap module with Nuxt Content.](https://nuxtseo.com/docs/sitemap/guides/content)

On this page

- [Introduction](#introduction)
- [I18n Modes](#i18n-modes)
- [Dynamic URLs with i18n](#dynamic-urls-with-i18n)
- [Debugging Hreflang](#debugging-hreflang)
- [Opting Out of I18n Integration](#opting-out-of-i18n-integration)

[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 "Nuxt SEO Pro")

- [Getting Started](https://nuxtseo.com/pro)
- [Dashboard](https://nuxtseo.com/pro/dashboard)
- [Pro MCP](https://nuxtseo.com/pro/docs/getting-started/mcp-setup)

### [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)