Nuxt SEO
Guides

Configuring Site Config

Configure all Nuxt SEO modules in one place using Nuxt Site Config.

Nuxt Site Config allows you to configure all Nuxt SEO modules at build time and runtime. Allowing you to powerfully configure all modules at runtime, for example in a multi-tenant or i18n app.

It's recommended to set the following config:

  • url - The canonical URL of your site, avoids duplicate content and consolidates page rank.
  • name - The name of your site, used in the title and meta tags.
  • description - The description of your site, used in the meta tags.
  • defaultLocale - The default locale of your site, used in the meta tags. (you can omit this if you're using @nuxtjs/i18n)
nuxt.config.ts
export default defineNuxtConfig({
  site: {
    url: 'https://example.com',
    name: 'Awesome Site',
    description: 'Welcome to my awesome site!',
    defaultLocale: 'en', // not needed if you have @nuxtjs/i18n installed
  }
})

Preview / Staging / Testing Environments

If you have non-production sites, such as staging or testing, you will need to configure these environments separately.

Learn how by reading the Disabling Indexing guide.

Runtime Site Config

In some cases, your site config becomes a bit more complex and you will need to generate it at runtime.

Learn how to by following the Runtime Site Config guide.