Guide JavaScript Framework SEO
SEO pour JavaScript frameworks — React, Suivant.js, Vue, Nuxt, Angular, Svelte, and Astro. How rendering mode (SSR, SSG, CSR) determines ce que Google peut index, and qui frameworks handle SEO meilleur out of the box.
Langues
JavaScript framework SEO comes bas to rendering mode: SSG and SSR give Googlebot pre-built HTML; CSR exige JavaScript execution que may or may pas succeed. Suivant.js and Nuxt have the la plupart built-in SEO prise en charge (SSR, SSG, ISR, metadata APIs). Pure React and Vue in CSR mode are the riskiest pour le SEO. Astro's island architecture is excellent pour le SEO by par défaut. Angular exige SSR via @angular/ssr (formerly Angular Universal) pour reliable indexation.
TL;DR — La plupart JavaScript frameworks construire pages in votre visitor’s navigateur (CSR). Ce fonctionne fine pour utilisateurs, but moteur de recherches pourrait pas run the JavaScript and miss votre content. The fix: utiliser a framework mode que builds pages on the server (SSR) or at construire temps (SSG). Suivant.js and Nuxt faire ce facile; pure React and Vue in CSR mode exiger supplémentaire fonctionner.
Pourquoi JavaScript frameworks have SEO concerns
Google processes JavaScript via exploration, rendering, and indexation, and blocked or failed resources peut modifier the rendered result. Evidence for this claim Primary standard or official documentation supporting the adjacent article claim. Scope: Protocol semantics and Search behavior are kept separate; no indexing, ranking, or migration-timing guarantee is inferred. Confidence: high · Verified: Google: JavaScript SEO basics Rendering mode and metadata implementation matter plus que the framework brand alone. Evidence for this claim Primary standard or official documentation supporting the adjacent article claim. Scope: Protocol semantics and Search behavior are kept separate; no indexing, ranking, or migration-timing guarantee is inferred. Confidence: high · Verified: web.dev: Rendering on the Web
Traditional websites send complet HTML from le serveur. Moteur de recherche robots d’exploration download que HTML and index le contenu immédiatement. JavaScript frameworks souvent fonctionner differently: le serveur sends a minimal HTML fichier, and alors JavaScript runs in le navigateur to construire the réel page content.
Si a moteur de recherche robot d’exploration doesn’t run votre JavaScript (or runs it but something fails), it sees an vide page. That’s the CSR SEO problem.
Rendering modes explained
- SSG (static site generation) — pages are construit as HTML at deploy temps. Robots d’exploration obtenir complet HTML with aucun JavaScript requis. Meilleur pour le SEO.
- SSR (rendu côté serveur) — le serveur builds the HTML fresh pour chaque requête. Robots d’exploration obtenir complet HTML. Aussi excellent pour le SEO.
- CSR (rendu côté client) — JavaScript builds lune page in le navigateur. Robots d’exploration doit run JavaScript to voir content. Google peut do ce, but échecs se produire and discovery is slower.
Frameworks by SEO safety out of the box
Safest:
- Astro — generates static HTML by par défaut; JavaScript seulement où vous opt in
- Suivant.js — offers SSG, SSR, and ISR; complet metadata API; industry standard
- Nuxt — même pour the Vue ecosystem; excellent SSR/SSG prise en charge
Exige configuration:
- Angular — CSR by par défaut; nécessite
@angular/ssr(formerly Angular Universal) pour safe SEO - React — CSR by par défaut; nécessite Suivant.js or React Router (framework mode) pour SSR/SSG
- Vue — CSR by par défaut; nécessite Nuxt pour SSR/SSG
- Svelte — CSR by par défaut; SvelteKit adds SSR/SSG prise en charge
TL;DR — At the technical level, JS framework SEO is à propos de: (1) rendering architecture pour the initial HTML payload, (2) metadata injection into
<head>avant la réponse is sent, (3) how the framework handles hydration and lien discovery, and (4) ISR cache staleness. Suivant.js has the la plupart complet built-in SEO tooling (Metadata API, built-inapp/sitemap.ts, image optimization). Astro is the la plupart SEO-safe by architecture.
Rendering mode, metadata API, and ISR prise en charge by framework
Framework capabilities and defaults modifier by version; vérifier les in chaque framework’s Documentation officielle. Evidence for this claim Primary standard or official documentation supporting the adjacent article claim. Scope: Protocol semantics and Search behavior are kept separate; no indexing, ranking, or migration-timing guarantee is inferred. Confidence: high · Verified: web.dev: Rendering on the Web Aucun rendering mode guarantees indexation or rankings. Evidence for this claim Primary standard or official documentation supporting the adjacent article claim. Scope: Protocol semantics and Search behavior are kept separate; no indexing, ranking, or migration-timing guarantee is inferred. Confidence: high · Verified: Google: JavaScript SEO basics Quand you’re comparing frameworks pour a decision, tester the même routes, content, deployment target and tooling pour chaque candidate — a benchmark que swaps quelconque of ceux isn’t measuring the framework, it’s measuring the difference in setup.
| Framework | Par défaut rendering | Built-in metadata API | SSR/SSG prise en charge | Ecosystem SEO prise en charge |
|---|---|---|---|---|
| Astro | SSG (islands) | Yes (<head> in .astro fichiers, Content Collections pour données structurées) | Les deux | Strong |
| Suivant.js | SSR/SSG (configurable) | Yes (Metadata API in App Router) | Les deux + ISR | Excellent |
| Nuxt | SSR by par défaut | Yes (useHead, useSeoMeta) | Les deux + ISR | Excellent |
| SvelteKit | SSR by par défaut | Yes (svelte:head) | Les deux | Bon |
| React Router (framework mode) | SSR by par défaut | Yes (meta export) | SSR + Deferred | Bon |
| Angular | CSR by par défaut | Via Angular Meta/Title services | Via @angular/ssr | Moderate |
| React (bare) | CSR | Manual (react-helmet-async; react-helmet is unmaintained) | Via Suivant.js/Gatsby | Dépend on wrapper |
| Vue (bare) | CSR | Manual (@unhead/vue; vue-meta is unmaintained) | Via Nuxt | Dépend on wrapper |
Remix v2 and React Router v7 merged — Remix’s server rendering and data-loading model now ships as React Router’s “framework mode,” and that’s the stable upgrade chemin pour Remix v2 apps. Remix 3 is a separate, experimental React-less rewrite (beta), pas the successor to Remix v2 — don’t treat it as a drop-in SSR option pour a React codebase.
Metadata timing, crawlable liens, and ISR cache staleness
Metadata injection timing — Metadata (<title>, <meta>) doit be in the
server réponse, pas ajouté by JavaScript après page charger. Suivant.js’s Metadata API,
Nuxt’s useSeoMeta, and Astro’s <head> component handle ce correctement.
document.title = '...' or React Helmet in CSR mode ne fait pas — it runs après the
initial HTML is served.
Lien discovery — Googlebot discovers liens by parsing HTML. Liens ajouté via
JavaScript (onClick, dynamic routing sans <a> tags) may pas be découvert.
Utiliser réel <a href> elements pour important navigation.
Hydration and contenu dupliqué — Si SSR and CSR render différent content (hydration mismatch), vous may fin up with indexé content que doesn’t match ce que utilisateurs voir. Tester pour hydration errors in le navigateur console.
Soft 404s — Client-side routers peut silently render a “page not found” UI pendant que returning a 200 HTTP status. Moteur de recherches index ces as réel pages. Assurez-vous votre 404 page renvoie a réel 404 status, and server-side redirections retourner 301.
ISR cache invalidation — In Suivant.js and Nuxt ISR setups, stale pages peut be
served to robots d’exploration during the revalidation window. Définir a time-based revalidate
interval, and pour content que changements on a schedule vous don’t contrôler (a CMS enregistrer,
Par exemple), pair it with on-demand revalidation triggered from a webhook-backed
route handler — voir the Suivant.js ISR guide
pour the complet API.
// app/blog/[id]/page.tsx — time-based revalidation
export const revalidate = 3600 // re-check this page at most once an hour
// app/api/revalidate/route.ts — on-demand revalidation, called by a CMS webhook
import { revalidatePath } from 'next/cache'
import { NextRequest, NextResponse } from 'next/server'
export async function POST(request: NextRequest) {
const { path, secret } = await request.json()
if (secret !== process.env.REVALIDATE_SECRET) {
return NextResponse.json({ message: 'Invalid secret' }, { status: 401 })
}
revalidatePath(path) // e.g. '/blog/1' — next request regenerates fresh HTML
return NextResponse.json({ revalidated: true })
} JavaScript framework SEO is primarily determined by rendering mode. SSG (pages construit as static HTML at deploy temps) and SSR (pages rendered server-side per requête) are les deux safe pour moteur de recherche indexation. CSR (pages rendered entirely in le navigateur via JavaScript) is riskier — Google peut execute JavaScript, but échecs and delays are courant, and discovery is slower.
Suivant.js (React meta-framework): La plupart complet built-in SEO prise en charge. App Router Metadata API, SSG/SSR/ISR, image optimization, built-in app/sitemap.ts (the next-sitemap package is now seulement nécessaire pour extensions it doesn’t cover), link-level prefetching. Industry standard pour le SEO-sensitive React apps.
Nuxt (Vue meta-framework): Equivalent capabilities pour Vue. Built-in useSeoMeta() and useHead() composables, SSR/SSG/ISR, Nuxt SEO module. Excellent pour Vue-based sites.
Astro: Island architecture ships zero JavaScript by par défaut. Pages are static HTML; interactivity ajouté via explicit “islands.” Meilleur SEO safety of quelconque JS framework by par défaut. Great pour content-heavy sites.
SvelteKit: SSR by par défaut, excellent metadata prise en charge via svelte:head. Solid SEO with minimal configuration.
Angular: CSR by par défaut, exige @angular/ssr (formerly Angular Universal) pour reliable indexation. Historically the la plupart SEO-problematic of the major frameworks.
React (bare): CSR by par défaut. Exige Suivant.js, React Router (framework mode), or Gatsby pour SSR/SSG. Remarque: Remix v2’s server-rendering model has merged into React Router v7/v8 as “framework mode” — that’s the maintained upgrade chemin, pas the separate, experimental React-less Remix 3 beta. Don’t utiliser bare CRA/Vite-React pour content que doit rank.
Vue (bare): Même problème. Utiliser Nuxt pour le SEO-critical Vue applications.
Svelte (bare): CSR by par défaut. Utiliser SvelteKit pour SSR/SSG.
JavaScript framework SEO checklist
Universal (s’applique to tout frameworks)
- Vérifier rendering mode:
curl -s URL | grep "<title>"— title doit apparaître in raw HTML - Vérifier que
<title>and<meta name="description">are in le serveur réponse - Utiliser réel
<a href>tags pour tout navigable liens (pas simplement click handlers) - Garantir 404 pages retourner HTTP 404, pas 200
- Garantir redirections utiliser server-side 301/302, pas
window.location.href - Generate and submit an XML sitemap
- Ajouter
robots.txtto votre public directory
Suivant.js
- Utiliser the App Router Metadata API (
metadataexport orgenerateMetadata()) - Choisir SSG (
generateStaticParams) or SSR (dynamic = 'force-dynamic') per route - Ajouter an
app/sitemap.tsfichier (App Router’s built-in sitemap prise en charge) pour la plupart sites; reach pour thenext-sitemappackage seulement si vous besoin cross-domain sitemaps or autre extensions the built-inMetadataRoute.Sitemaptype doesn’t model - Utiliser
next/imagepour tout images (automatic WebP, sizing, lazy-load) - Vérifier ISR
revalidatevaleurs — définir short windows pour frequently-updated pages
Nuxt
- Utiliser
useSeoMeta()oruseHead()in every page component - Install the
@nuxtjs/sitemapmodule - Utiliser Nuxt’s built-in SSR (or
nuxt generatepour SSG) - Configurer
robots.txtvia@nuxtjs/robots
Astro
- Réussir SEO props to votre
<BaseHead>component on every page - Utiliser Astro’s
@astrojs/sitemapintegration - Garder JavaScript islands minimal — éviter converting static sections to islands
Angular
- Enable SSR via
ng add @angular/ssr - Utiliser
MetaandTitleservices pour metadata - Ajouter transfer state to prevent API double-fetching on hydration
Framework deep dives
Connexe reading
Journal des modifications
Mis à jour le 19 juil. 2026.
Résumé éditorial et détails enregistrés des changements.Détails des changements
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
Comparaison complète indisponible — aucun instantané antérieur n’a été archivé pour cette révision.