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:
- Ensure you're using SSR (not SPA mode)
- Run
pnpm buildand check the generated HTML - Enable debug mode to see what's being set:
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:
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
- Meta Tag Checker - Validate title and description, preview Google SERP appearance
- Social Share Debugger - Debug OG images and social cards
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: