Free auditStart free
GuideNuxt · Framework guide

Nuxt SEO

Configure Nuxt SEO with `useSeoMeta`, reactive route data, canonical URLs, and rendering choices that match each page's search role.

5 min
read
6
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

Use Nuxt's useSeoMeta() for typed SEO and social tags, and useHead() for canonical links. Set stable defaults at the app level, then derive route metadata from the same data used to render each page. Keep metadata in the server response, use reactive getters only when values change, and verify canonical URLs, robots rules, and sitemap coverage in production.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Checklist

Set stable app defaults and route-specific metadata

Nuxt uses Unhead for managing the document head. Put stable defaults such as the site title, HTML language, and favicon in app.head or the root app. Add page-specific title, description, canonical, and social metadata in the route that knows the content. This prevents a shared default from masking every article or product with the same snippet.
  1. 01Use useSeoMeta() for typed SEO and social fields; Nuxt documents it as the recommended safe option for these tags.
  2. 02Use useHead() for broader head elements and canonical links. Keep absolute canonical URLs tied to the public domain, not a preview host. Google says the best way to set the canonical URL is in HTML, and that JavaScript must never change it to a different URL than the one in the original HTML.
  3. 03For user-generated values, use useHeadSafe() so unsafe values and attributes are filtered instead of injecting arbitrary markup.
  4. 04Make titles distinct where pages target distinct needs. Metadata should describe visible content and should not promise details the page does not provide.
  5. 05Use titleTemplate for consistent brand formatting. It takes a string where %s is replaced by the title, or a function; Nuxt says a function cannot be set in nuxt.config, so put it in app.vue. Then confirm it does not produce repeated separators or a duplicate brand name.
Route metadata with Nuxt 4
<script setup lang="ts">
const product = await getProduct()

useSeoMeta({
  title: product.name,
  description: product.summary,
  ogTitle: product.name,
  ogDescription: product.summary,
})

useHead({
  link: [{ rel: 'canonical', href: `https://example.com/products/${product.slug}` }],
})
</script>

Nuxt 3 and Nuxt 4 share core head composables, but route conventions and file locations can differ. Use the docs for the installed major version and avoid copying paths from a different generation without checking your app structure.

02Set metadata based on route data

Derive metadata from the content that renders

For a CMS route, load the record on the server and use its title and summary for both the visible page and metadata. This keeps the response useful even before client-side hydration and helps prevent metadata from describing a different or missing item.
Route

Article

Metadata inputs
Headline, summary, author, publication date, social image.
Important check
Structured article data and visible headline agree.
Route

Product

Metadata inputs
Product name, short benefit, availability, canonical slug.
Important check
Price and availability match the visible page and schema.
Route

Localized page

Metadata inputs
Translated title and description, locale-specific canonical.
Important check
Each locale points to its own URL and has accurate alternate links.
Route

Search or filter page

Metadata inputs
Only if it is a useful, stable landing page.
Important check
Do not create indexable metadata for endless query permutations.

When a route record is missing, return a true not-found response rather than a generic page with fallback SEO tags. Ensure canonical values do not include tracking parameters, session identifiers, or unintended query strings.

03How it works

Choose server, prerendered, and client routes deliberately

Nuxt can render routes on the server, prerender them, or use client-only behavior. Public content that rarely changes is often a good prerender candidate; pages needing fresh catalog data may need server rendering or controlled revalidation. A private account route should not be exposed in a public sitemap. Confirm the initial HTML contains the main answer and metadata for pages that need organic discovery.
  1. 01

    Assign route rules based on content

    Use static generation for stable public routes, server rendering for request-time data, and client-only rendering where user-specific interactions require it.

  2. 02

    Keep server-rendered metadata deterministic

    Generate title, description, and canonical on the server from the route record. Do not depend on a later client request to reveal the page's topic.

  3. 03

    Use reactivity only when metadata changes

    Nuxt notes that SEO meta tags usually do not need to be reactive because search engine robots primarily scan the initial page load. Use the getter syntax (() => value) for values that really change, and wrap static useSeoMeta calls in if (import.meta.server). The older useServerSeoMeta composable is deprecated in favor of that pattern.

  4. 04

    Check the production response

    View source or inspect the first HTTP response. Confirm the content, canonical, status, and robots policy before client-side navigation runs.

04Checklist

Cover crawl discovery and validate search behavior

Nuxt's head composables manage document metadata; a sitemap or robots endpoint still needs to be created or configured for the project's route inventory. Do not assume that setting a title creates sitemap coverage. Use one sitemap source and list only public, canonical routes with successful responses.
  1. 01Generate sitemap entries from the same source that enumerates deployed public routes, including dynamic content where appropriate.
  2. 02Reference the sitemap index in robots.txt and check both files on the production domain.
  3. 03Add ordinary internal links to important routes so visitors and crawlers can reach them without relying on a sitemap alone. Google lists internal links, allowing crawling in robots.txt, and important content in text form among the SEO fundamentals that still apply to its AI features.
  4. 04Use Search Console to inspect crawl and canonical selection for important pages; sitemap submission does not guarantee indexing.
  5. 05For valid structured data, render JSON-LD with the page and match it to visible content; avoid duplicated schema from multiple components.

For a framework-specific checklist, see the XML sitemap overview. Focus on pages with query demand and real content differences rather than publishing thin route permutations.

Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What is the recommended way to add SEO metadata in Nuxt?

Nuxt recommends useSeoMeta() for typed SEO and social tags. Use useHead() for other head elements such as canonical links, and derive route values from the page's content.

02Does Nuxt automatically generate a sitemap?

Nuxt head composables manage metadata, but you need to configure or generate a sitemap for your routes. Verify that dynamic public URLs are included and private or duplicate routes are excluded.

03Should Nuxt SEO metadata be reactive?

Usually not for search metadata that stays stable per route. Nuxt recommends reactive getters only when the value actually changes; static tags can be generated server-side.

04Is Nuxt SEO different in Nuxt 3 and Nuxt 4?

Core composables are similar, but route conventions and file structure can vary. Follow documentation for the app's installed Nuxt version and verify the rendered output.

Sources · 6

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • nuxt.com
  • google.com
  1. 01useSeoMeta | Nuxt 4 Docsnuxt.com · checked 2026-10-24
  2. 02SEO and Meta | Nuxt Docsnuxt.com · checked 2026-10-24
  3. 03useHeadSafe | Nuxt 4 Docsnuxt.com · checked 2026-10-24
  4. 04JavaScript SEO basics | Google Search Centraldevelopers.google.com · checked 2026-10-24
  5. 05AI features and your website | Google Search Centraldevelopers.google.com · checked 2026-10-24
  6. 06SEO Starter Guide | Google Search Centraldevelopers.google.com · checked 2026-10-24
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane