{{ $t('home.title') }}
{{ $t('home.description') }}
# Nuxt SEO > Nuxt SEO is a collection of hand-crafted Nuxt Modules to help you rank higher in search engines. Canonical Origin: https://nuxtseo.com ## LLM Resources - [Full Content](https://nuxtseo.com/llms-full.txt) Complete page content in markdown format. - [MCP](https://nuxtseo.com/mcp) Model Context Protocol server endpoint for AI agent integration. ## Pages ### Nuxt SEO · All-in-one Technical SEO for Nuxt Source: https://nuxtseo.com/ Description: Nuxt SEO is a collection of hand-crafted Nuxt Modules to help you rank higher in search engines. h1. Fully equipped** **Technical SEO** for busy **Nuxters**. ** Nuxt SEO is a collection of [**modules **](https://nuxt.com/modules) that handle all of the technical aspects in growing your sites organic traffic. [**Get Started **](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction) [** Install Nuxt SEO **](https://nuxtseo.com/docs/nuxt-seo/getting-started/installation) [Robots](https://nuxtseo.com/docs/robots/getting-started/introduction) [Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction) [OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction) [Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction) [Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction) [SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction) 1. h2. **Put web crawlers to work.** Providing a robots.txt and sitemap.xml gives web crawlers data on how to index your site. [Robots **v5.6.7** 7.8M 502 Tame the robots crawling and indexing your site with ease.](https://nuxtseo.com/docs/robots/getting-started/introduction) [Sitemap **v7.5.0** 9.2M 410 Powerfully flexible XML Sitemaps that integrate seamlessly.](https://nuxtseo.com/docs/sitemap/getting-started/introduction) 2. h2. **Feed semantic data to hungry bots.** Robots love data, give them what they want with Schema.org and Open Graph tags. [Schema.org **v5.0.10** 3.3M 178 The quickest and easiest way to build Schema.org graphs.](https://nuxtseo.com/docs/schema-org/getting-started/introduction) [SEO Utils **v7.0.19** 1.5M 119 SEO utilities to improve your Nuxt sites discoverability and shareability.](https://nuxtseo.com/docs/seo-utils/getting-started/introduction) 3. h2. **Humanize it.** Technical SEO doesn't just involve robots, make sure your site is human friendly too. [OG Image **v5.1.13** 2.9M 495 Generate OG Images with Vue templates in Nuxt.](https://nuxtseo.com/docs/og-image/getting-started/introduction) [SEO Utils **v7.0.19** 1.5M 119 SEO utilities to improve your Nuxt sites discoverability and shareability.](https://nuxtseo.com/docs/seo-utils/getting-started/introduction) 4. h2. **Nurture and watch it flourish.** Providing a robots.txt and sitemap.xml gives web crawlers data on how to index your site. [Link Checker **v4.3.9** 2.3M 95 Find and magically fix links that may be negatively effecting your SEO.](https://nuxtseo.com/docs/link-checker/getting-started/introduction) h2. **Nuxt SEO Principals ** h3. **Delightful Developer Experience** Full featured modules that do everything you expect and more. h3. **Zero Config Defaults** Provide a site URL and all modules are good to go. Fully extensible with config and hooks.  h3. **Integrate with Ecosystem** Modules integrate with themselves as well as Nuxt Content, Nuxt I18n and Nuxt DevTools. h3. **For Apps All Shapes and Sizes ** Single Page Server-Side Generated Server-Side Rendered Multi-tenancy Base URL Trailing Slashes h2. **Learn SEO ** Comprehensive guides for technical SEO with code examples and best practices. [
{{ $t('home.description') }}
The page you're looking for doesn't exist.
{{ error?.message }}
{{ product.description }}
The page you're looking for doesn't exist or has moved.
{{ error?.message }}
{{ post?.content }}
Loading 500+ products from our catalog...
Fix meta tags not rendering...
Content
Long static content...
Long static content...
The page you're looking for doesn't exist.
Go home \` } ``` ``` // server.js for Vite SSR import express from 'express' import { createServer as createViteServer } from 'vite' const app = express() const vite = await createViteServer({ server: { middlewareMode: true } }) app.use(vite.middlewares) app.use('*', async (req, res) => { const url = req.originalUrl const routeExists = await checkRoute(url) if (!routeExists) { res.status(404) const html = await vite.transformIndexHtml(url, render404Template()) res.send(html) return } // Normal SSR render const html = await renderSSR(url) res.send(html) }) ``` ``` import { defineEventHandler, setResponseStatus } from 'h3' export default defineEventHandler((event) => { const routeExists = checkRoute(event.path) if (!routeExists) { setResponseStatus(event, 404) return render404Page() } return renderVueApp(event.path) }) ``` Add `noindex` meta tag to prevent 404 pages from appearing in search results if accidentally crawled with wrong status code. h2. [Soft 404 Errors Explained](#soft-404-errors-explained) Soft 404 detection happens when Google sees content that looks like an error page but receives `200 OK` status ([**Google Search Central**](https://developers.google.com/search/docs/crawling-indexing/http-network-errors#soft-404-errors)). Common triggers: - "Page not found" in title or heading - Minimal content (under ~200 words) - Redirecting all 404s to homepage - Empty page body with "coming soon" message - Generic error messages without meaningful content Google Search Console flags soft 404s in the "Page Indexing" report. Fix by returning proper `404` status code. h3. [Why Soft 404s Hurt SEO](#why-soft-404s-hurt-seo) 1. **Wasted crawl budget** - Google recrawls pages thinking they exist, leaving less budget for real pages 2. **Index bloat** - Search Console shows thousands of indexed URLs that don't exist 3. **Ranking signals confusion** - Google doesn't know if content moved or disappeared 4. **No link equity transfer** - Can't redirect or canonicalize non-existent pages properly h3. [Vue SPA Soft 404 Problem](#vue-spa-soft-404-problem) Vue Router handles routing client-side. Server returns `200 OK` for all paths: ``` // ❌ Bad - SPA returns 200 for /fake-page app.get('*', (req, res) => { res.send(indexHtml) // Always 200 OK }) ``` Vue Router then renders 404 component in browser after JavaScript executes. Google sees `200 OK` response, might see error content, flags as soft 404. **Solution:** Check route existence server-side before rendering. h2. [Checking Routes Server-Side](#checking-routes-server-side) Match incoming paths against your Vue Router configuration: ``` import { createMemoryHistory, createRouter } from 'vue-router' import routes from './routes' function checkRoute(path: string): boolean { const router = createRouter({ history: createMemoryHistory(), routes }) const resolved = router.resolve(path) return resolved.matched.length > 0 } ``` Integrate with server: ``` import express from 'express' import { checkRoute } from './router-check' const app = express() app.get('*', (req, res) => { if (!checkRoute(req.path)) { res.status(404).send(render404Page()) return } res.send(renderVueApp(req.path)) }) ``` ``` import express from 'express' import { checkRoute } from './router-check' const app = express() app.use('*', async (req, res) => { if (!checkRoute(req.originalUrl)) { res.status(404) res.send(await render404SSR()) return } res.send(await renderVueApp(req.originalUrl)) }) ``` ``` import { defineEventHandler, setResponseStatus } from 'h3' import { checkRoute } from './router-check' export default defineEventHandler((event) => { if (!checkRoute(event.path)) { setResponseStatus(event, 404) return render404Page() } return renderVueApp(event.path) }) ``` h2. [Dynamic Routes Considerations](#dynamic-routes-considerations) Dynamic routes (`/products/:id`) need data fetching to determine existence: ``` async function checkDynamicRoute(path: string): Promise{{ post.content }}
```
Or use aspect ratio with CSS:
```
Loading 500+ products from our catalog...
Fix meta tags not rendering...
Content