← All framework guides

Nuxt SEO: 7 checks and how to fix them

These are the Nuxt-specific checks RankCLI runs, and the fix for each one in Nuxt's own idiom. Nuxt renders on the server by default, which removes a whole class of SEO problems before you start.

7 checks
1 rated error
meta-framework
SSR by default

Run all of these against your own site, free and without an account:

npx @rankcli/cli audit -u https://your-site.dev

What Nuxt gives you for free

  • •Universal rendering (SSR) by default
  • •Static site generation support
  • •Built-in useSeoMeta composable
  • •Automatic code splitting
  • •File-based routing
  • •NuxtImage for image optimization

The checks

warning
NUXT_NO_USESEOMETA

Not using useSeoMeta composable

Nuxt 3 has built-in SEO meta composables that are cleaner than useHead.

Use useSeoMeta for SEO tags:

<script setup>
useSeoMeta({
  title: 'Page Title',
  description: 'Page description',
  ogTitle: 'OG Title',
  ogDescription: 'OG Description',
  ogImage: '/og-image.jpg',
  twitterCard: 'summary_large_image',
});
</script>
warning
NUXT_USEFETCH_CLIENT_ONLY

Data fetching only on client side

Using onMounted for data fetching bypasses SSR benefits.

Use useFetch or useAsyncData instead:

<script setup>
// Bad - client only
const data = ref(null);
onMounted(async () => {
  data.value = await $fetch('/api/data');
});

// Good - SSR friendly
const { data } = await useFetch('/api/data');
</script>
warning
NUXT_NO_NUXT_IMAGE

Not using NuxtImage for images

@nuxt/image provides automatic optimization and responsive images.

Install and use NuxtImage:

npx nuxi module add image
<template>
  <NuxtImg
    src="/hero.jpg"
    alt="Hero"
    width="1200"
    height="630"
    preload
  />
</template>
warning
NUXT_NO_ROBOTS

Missing robots.txt configuration

Use @nuxtjs/robots module for robots.txt.

Install and configure robots module:

npm install @nuxtjs/robots
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxtjs/robots'],
  robots: {
    rules: [
      { UserAgent: '*', Allow: '/' },
      { UserAgent: '*', Disallow: '/api/' },
    ],
    sitemap: 'https://yoursite.com/sitemap.xml',
  },
});
warning
NUXT_NO_SITEMAP

Missing sitemap configuration

Use @nuxtjs/sitemap module for automatic sitemap.

Install sitemap module:

npm install @nuxtjs/sitemap
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxtjs/sitemap'],
  sitemap: {
    hostname: 'https://yoursite.com',
  },
});
error
NUXT_SPA_MODE

Nuxt running in SPA mode

SPA mode disables SSR, losing SEO benefits.

Remove ssr: false from nuxt.config.ts:

export default defineNuxtConfig({
  // Remove this line
  // ssr: false,
});

If you need client-only components, use <ClientOnly>:

<ClientOnly>
  <BrowserOnlyWidget />
</ClientOnly>
notice
NUXT_NO_PRERENDER

Static pages not pre-rendered

Static pages could be pre-rendered for better performance.

Enable route prerendering in nuxt.config.ts:

export default defineNuxtConfig({
  routeRules: {
    '/about': { prerender: true },
    '/blog/**': { prerender: true },
  },
});

Or generate a fully static site:

nuxt generate

Check your own Nuxt site

280+ checks including every one above. No signup, nothing leaves your machine.

Run a free audit