Index of every page on this site: llms.txt

Troubleshooting Nuxt SEO Utils

Debugging

Meta Tags Missing in Production

Problem: Meta tags work in development but are missing in production.

Solution: Check the following:

  1. Ensure you're using SSR (not SPA mode)
  2. Run pnpm build and check the generated HTML
  3. Enable debug mode to see what's being set:
nuxt.config.ts
export default defineNuxtConfig({
  seo: {
    debug: true
  }
})

lang Attribute Not Applied

Problem: You set htmlAttrs: { lang: 'ja' } in useHead() but the HTML element still shows lang="en".

Why: When automaticDefaults is enabled (default), the module automatically sets the lang attribute based on site config, not from useHead() calls.

Solution: Set the locale via site config instead:

nuxt.config.ts
export default defineNuxtConfig({
  site: {
    defaultLocale: 'ja'
  }
})

See the I18n Guide for detailed information.

Canonical URL Not Using My Custom Logic

Problem: You set a custom canonical URL, but the page still renders the automatic one.

Why: The module registers the automatic canonical at low priority. A page-level useHead() canonical replaces it without extra options. If the automatic canonical still renders, your call did not run on the server for that page.

Solution: Set the canonical in the page component with useHead():

useHead({
  link: [{ rel: 'canonical', href: 'https://example.com/custom' }]
})

To remove all automatic defaults, including the canonical, disable them:

export default defineNuxtConfig({
  seo: {
    automaticDefaults: false
  }
})

Debugging Tools

Submitting an Issue

When submitting an issue, it's important to provide as much information as possible.

The easiest way to do this is to create a minimal reproduction using the StackBlitz playgrounds:

Was this page helpful?