Index of every page on this site: llms.txt

All Nuxt SEO modules integrate automatically with @nuxtjs/i18n and nuxt-i18n-micro. You do not need extra configuration; Nuxt SEO detects the integration when you install either module.

Nuxt SEO needs @nuxtjs/i18n v10 or later. With v9, the build stops with this error:

Module `@nuxtjs/i18n` version (`9.x`) does not satisfy `>=10.0` (requested by `@nuxtjs/seo`).

Upgrade @nuxtjs/i18n to fix it.

Example Setup

nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@nuxtjs/i18n', // or 'nuxt-i18n-micro'
    '@nuxtjs/seo',
  ],

  site: {
    // fallback if no nuxtSiteConfig translation is provided
    name: 'My Site',
  },

  i18n: {
    baseUrl: 'https://example.com',
    defaultLocale: 'en',
    strategy: 'prefix_except_default',
    langDir: 'locales/',
    locales: [
      { code: 'en', language: 'en-US', file: 'en.ts' },
      { code: 'fr', language: 'fr-FR', file: 'fr.ts' },
    ],
  },
})

Translated Site Name & Description

Your site name and description will often differ per locale. You can provide translated values through a nuxtSiteConfig key in your locale files. These override the site.name and site.description set in nuxt.config.ts.

export default {
  nuxtSiteConfig: {
    name: 'My Site',
    description: 'Welcome to my site!',
  },
}

All modules use the translated values automatically: meta tags, Schema.org, OG images, and anywhere else site name or description appears.

See Site Config I18n docs for the full details.

What Each Module Does

With the config above, here is what each module produces.

SEO Utils

Locale meta tags are set automatically on the <html> element and in <head>.

English (/):

<html lang="en-US">
<head>
  <title>My Site</title>
  <meta property="og:locale" content="en_US">
  <meta property="og:site_name" content="My Site">
  <meta name="description" content="Welcome to my site!">
  <link rel="canonical" href="https://example.com/">
</head>

French (/fr):

<html lang="fr-FR">
<head>
  <title>Mon Site</title>
  <meta property="og:locale" content="fr_FR">
  <meta property="og:site_name" content="Mon Site">
  <meta name="description" content="Bienvenue sur mon site!">
  <link rel="canonical" href="https://example.com/fr">
</head>

Full docs

Sitemap

The sitemap module generates a sitemap index with a separate sitemap per locale:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/__sitemap__/en-US.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://example.com/__sitemap__/fr-FR.xml</loc>
  </sitemap>
</sitemapindex>

Each locale sitemap includes hreflang alternatives linking between translations.

Full docs

Robots

Robots rules are automatically expanded to include locale-prefixed paths based on your i18n strategy.

User-agent: *
Disallow:

Sitemap: https://example.com/sitemap_index.xml

Full docs

Schema.org

Schema.org creates a WebSite entity per locale with workTranslation linking between them:

{
  "@type": "WebSite",
  "name": "My Site",
  "description": "Welcome to my site!",
  "inLanguage": "en-US",
  "url": "https://example.com/",
  "workTranslation": [
    { "@id": "https://example.com/#website" },
    { "@id": "https://example.com/fr#website" }
  ]
}

Full docs

OG Image: generates images per locale, using the locale-specific site name and description as default props. Full docs

Site Config: extracts url, defaultLocale, and currentLocale from your i18n config. The nuxtSiteConfig translation key provides per-locale name and description. Full docs

Was this page helpful?