暫定日本語訳:Svelte SEO

暫定日本語訳:Svelte alone is クライアント-side rendered — コンテンツ isn't in raw HTML. SvelteKit fixes その とともに SSR by デフォルト. Rendering modes, svelte:head, load functions, adapters, sitemaps, と SPA-mode trap.

初回公開:2026年6月26日 · 最終更新:2026年8月4日 · Advanced
言語

暫定日本語訳:Svelte SEO hinges on one distinction: plain Svelte is クライアント-side rendered ( blank HTML shell), while SvelteKit renders on サーバー by デフォルト と ships full HTML. 使用 SvelteKit 向けに anything その needs へ 順位. Manage metadata とともに svelte:head, fetch SEO データ in +ページ.サーバー.js load functions, pick right adapter, と 決して ship SPA fallback mode (ssr: false) — SvelteKit docs themselves warn it has large negative SEO impacts.

暫定日本語案: TL;DR — Svelte SEO is really SvelteKit conversation. Bare Svelte is 暫定日本語案: CSR-だけ — コンテンツ isn’t in raw HTML. SvelteKit defaults へ SSR, 暫定日本語案: supports prerendering (SSG) per route, と lets あなた mix modes. Manage metadata 暫定日本語案: とともに <svelte:head> と フィード it から +page.server.js load functions so it lands 暫定日本語案: in initial HTML. sharpest trap: adapter-static とともに ssr: false does 暫定日本語案: ない prerender — it produces empty shells; SSR 必要がある stay on during 構築. 暫定日本語案: SvelteKit’s own docs warn SPA fallback has “large negative performance and SEO impacts.” 使用 History API routing ( デフォルト), 設定 trailingSlash, と 暫定日本語案: pick adapter へ match — static 向けに コンテンツ, node/vercel/cloudflare 向けに SSR.

Evidence for this claim The article's described svelte-seo capabilities must be evaluated against the platform's current documentation rather than assumed to be search-engine behavior. Scope: Platform-specific capability documentation. Confidence: high · Verified: SvelteKit page options Evidence for this claim Regardless of platform, Google needs crawlable URLs, accessible rendered content, descriptive metadata, and valid search directives. Scope: Google requirements independent of platform. Confidence: high · Verified: Google Search Central: SEO Starter Guide

Svelte is ない SvelteKit — と 向けに SEO その’s everything

暫定日本語案: Svelte is compiler. It turns あなた .svelte components へ lean vanilla 暫定日本語案: JavaScript とともに no virtual DOM と no runtime library shipped へ ブラウザー. その 暫定日本語案: gives Svelte real パフォーマンス edge — ただし it’s bundle-size optimization, ない 暫定日本語案: rendering one. plain Svelte app (Vite-bundled, no meta-framework) is still 暫定日本語案: クライアント-side-rendered SPA: サーバー returns blank HTML shell と ブラウザー 暫定日本語案: constructs ページ. View ソース on one と あなた コンテンツ isn’t there.

暫定日本語案: この is #1 ソース of confusion いつ 人々 検索 “Svelte SEO.” compile 暫定日本語案: 手順 doesn’t put コンテンツ in HTML. SvelteKit does. SvelteKit is Svelte’s 暫定日本語案: 公式 meta-framework — equivalent of Next.js 向けに React または Nuxt 向けに Vue — と 暫定日本語案: it renders ページ on サーバー by デフォルト, shipping fully populated HTML 前に 暫定日本語案: any JavaScript runs. It adds SSR, static prerendering, file-based routing, load 暫定日本語案: functions, と deployment adapters. headline: bare Svelte = CSR-だけ; 暫定日本語案: SvelteKit = SSR-最初. Everything else in この guide assumes SvelteKit.

暫定日本語案: Two scoping notes worth stating precisely, because それら’re どこ generic “Svelte SEO” advice goes 誤った: SvelteKit’s rendering options (ssr, csr, prerender, 暫定日本語案: trailingSlash) are 設定 per route と inherit hierarchically — +layout.js 暫定日本語案: または +layout.server.js できる 設定 デフォルト 向けに everything beneath it, と child 暫定日本語案: route できる override it. So “is this SvelteKit site SEO-friendly” isn’t 暫定日本語案: project-level question; 確認 specific route. と of SvelteKit’s rendering 暫定日本語案: options, it’s specifically ssr: false — ない SSR being merely absent, と ない 暫定日本語案: “using SvelteKit” in general — その docs tie へ empty output: “If you set ssr to false, it renders an empty ‘shell’ page instead.” この guide is 現在の 暫定日本語案: 向けに Svelte 5.x と SvelteKit 2.x ( 現在の majors as of この update); Svelte 5 暫定日本語案: made runes デフォルト reactivity model, ただし runes are component-authoring 暫定日本語案: concern, ない rendering mode — それら don’t change any of SEO guidance below.

暫定日本語案: なぜ rendering mode matters comes straight から どのように 検索エンジン 機能. Google 暫定日本語案: processes JavaScript in three phases — クロール, rendering, と インデックス登録 — と 暫定日本語案: “all pages with a 200 HTTP status code are sent to the rendering queue, no matter whether JavaScript is present on the page.” render queue adds delay, と as 暫定日本語案: Google’s own guidance puts it, “server-side or pre-rendering is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript.” その 最後 clause is doing lot of 機能 in 2026 — see 暫定日本語案: AI-crawler section.

four rendering modes in SvelteKit

暫定日本語案: SvelteKit’s strength is その rendering is per-route decision via ページ options. 暫定日本語案: これらの options are hierarchical: 設定 デフォルト in +layout.js/+layout.server.js 暫定日本語案: と すべての nested route inherits it, unless child route エクスポート its own value へ 暫定日本語案: override it. 確認 option その actually applies へ specific route あなた care 暫定日本語案: について — ない just value 設定 at top of project.

  • 暫定日本語案: SSR ( デフォルト). ページ are rendered サーバー-side と full HTML is in 暫定日本語案: initial レスポンス. Best 向けに dynamic, personalized, または frequently changing コンテンツ. 暫定日本語案: この is on unless あなた turn it off.
  • 暫定日本語案: Prerender (export const prerender = true). ページ are generated as static 暫定日本語案: HTML at 構築 time. Maximum speed と maximum crawlability — ideal 向けに blog posts, 暫定日本語案: docs, と marketing ページ. Crucially, prerendering is SSR run at 構築 time, so 暫定日本語案: SSR 必要がある remain enabled 向けに it へ 機能.
  • 暫定日本語案: SPA fallback (ssr: false). single-ページ-app shell とともに no サーバー rendering. 暫定日本語案: SvelteKit docs are blunt その この mode “has large negative performance and SEO impacts” と is really meant 向けに things like wrapping in mobile app — ない 暫定日本語案: 向けに コンテンツ あなた want インデックス登録.
  • 暫定日本語案: Hybrid. Mix modes per route: prerender あなた marketing ページ, SSR あなた 商品 暫定日本語案: ページ, run SPA-style admin behind login. この is SvelteKit’s killer feature — 暫定日本語案: あなた don’t pick one rendering mode 向けに whole サイト.

ssr: false trap ( mistake へ 避ける)

暫定日本語案: この is 大半の expensive misunderstanding in SvelteKit SEO, so it gets its own 暫定日本語案: section. 人々 reach 向けに adapter-static へ “make a static site,” と then 設定 暫定日本語案: ssr: false thinking それら’re getting prerendered HTML. それら aren’t.

暫定日本語案: Prerendering is サーバー-side rendering executed at 構築 time. If あなた disable SSR, 暫定日本語案: there is nothing へ render — docs are explicit その ssr: false “renders an empty ‘shell’ page instead,” と その’s exactly 何 adapter-static then ships as 暫定日本語案: あなた prerendered output. コンテンツ だけ 表示される once クライアント-side JavaScript runs, 暫定日本語案: which puts あなた right back in CSR territory (とともに all its crawler 問題) despite 暫定日本語案: having “static” 構築. rule: とともに adapter-static, leave ssr on (its 暫定日本語案: デフォルト) so prerendering outputs real HTML. 使用 ssr: false だけ いつ あなた 暫定日本語案: genuinely want SPA shell と accept SEO cost.

Managing metadata とともに <svelte:head>

暫定日本語案: SvelteKit has special element, <svelte:head>, その injects コンテンツ へ 暫定日本語案: document <head> — と あなた don’t need third-party library へ manage あなた タイトル 暫定日本語案: と meta tags. すべての ページ すべき have unique <title> と 暫定日本語案: <meta name="description">, plus canonical, Open Graph, Twitter Card, hreflang, 暫定日本語案: robots directives, と JSON-LD as needed.

暫定日本語案: pattern 公式 docs recommend 向けに dynamic metadata:

  1. 暫定日本語案: Return SEO metadata から +page.server.js load() function.
  2. 暫定日本語案: Access it via page.data in あなた layout.
  3. 暫定日本語案: Render it in <svelte:head> in root +layout.svelte.
<!-- +layout.svelte -->
<script>
  import { page } from '$app/state';
</script>

<svelte:head>
  <title>{page.data.title}</title>
  <meta name="description" content={page.data.description} />
  <link rel="canonical" href={page.data.canonical} />
</svelte:head>

暫定日本語案: If あなた’d rather 使用 component wrapper, third-party 暫定日本語案: svelte-seo package wraps <svelte:head> 暫定日本語案: とともに props 向けに 一般的な tags — ただし it’s convenience, ない requirement.

暫定日本語案: <svelte:head> gets あなた tags へ head; it doesn’t verify あなた got them right. 暫定日本語案: その’s still あなた job: confirm すべての route renders unique タイトル と 暫定日本語案: 説明 (ない one inherited から layout by accident), その canonical 暫定日本語案: あなた emit is consistent 間に direct-リクエスト HTML と 何 クライアント-side 暫定日本語案: navigation renders, と その robots directives と JSON-LD are present in raw 暫定日本語案: レスポンス — ない だけ visible 後に hydration.

Load functions: どこ あなた fetch SEO データ matters

暫定日本語案: この is metadata bug その bites 人々. +page.server.js load() runs on 暫定日本語案: サーバー, so its データ is in initial HTML レスポンス. +page.js load() runs on 暫定日本語案: サーバー 向けに 最初 render と on クライアント during クライアント-side navigation. 暫定日本語案: mistake is fetching あなた タイトル/説明/canonical in <script> block とともに 暫定日本語案: onMount() — その runs クライアント-side だけ, so initial HTML ships とともに no 暫定日本語案: metadata と crawler sees nothing on 最初 fetch. Fetch SEO-critical データ in 暫定日本語案: load function (サーバー load 向けに anything その 必要がある be in 最初 レスポンス), ない 暫定日本語案: in onMount.

暫定日本語案: Don’t assume file name alone proves boundary, though — +page.js load() 暫定日本語案: また runs on サーバー 向けに 最初 リクエスト, then re-runs クライアント-side on 暫定日本語案: navigation, と its return value has へ survive serialization へ be reused safely 暫定日本語案: on クライアント. If SEO-critical データ ever depends on value その isn’t safely 暫定日本語案: serializable, verify both direct-リクエスト HTML と クライアント-navigated view of 暫定日本語案: 同じ route, ない just one または other.

Routing と URL structure

  • 暫定日本語案: File-based routing とともに [param] 向けに dynamic segments gives あなた clean, 暫定日本語案: predictable URLs.
  • 暫定日本語案: History API routing is デフォルト — SvelteKit doesn’t 使用 hash/fragment 暫定日本語案: routing, と その’s exactly 何 あなた want. Google できる’t reliably resolve 暫定日本語案: hash-based (#/page) URLs, so History API routing is SEO-safe choice と 暫定日本語案: SvelteKit 作る it デフォルト.
  • 暫定日本語案: trailingSlash in svelte.config.js accepts 'always', 'never', または 暫定日本語案: 'ignore'. SvelteKit handles canonical リダイレクト 向けに あなた, ただし leaving it 暫定日本語案: misconfigured (especially 'ignore') できる 作成 duplicate-コンテンツ variants. Pick 暫定日本語案: one と be consistent.
  • 暫定日本語案: Dynamic routes あなた want prerendered need entries function へ enumerate 暫定日本語案: paths at 構築 time, または SvelteKit won’t know which URLs へ generate.

Choosing adapter 向けに SEO

暫定日本語案: adapter decides どのように と どこ あなた SvelteKit app is deployed, と その has SEO 暫定日本語案: consequences (mostly via TTFB, which フィード LCP):

AdapterRenderingSEO implication
adapter-staticFull SSGTrue static HTML 向けに すべての ページ; no サーバー needed; ideal 向けに コンテンツ-heavy サイト (保つ ssr on!)
adapter-nodeSSR on Node サーバーDynamic SSR, full flexibility; あなた run サーバー
adapter-vercelSSR + edgeSSR とともに optional edge functions; edge TTFB 役立つ LCP
adapter-cloudflareSSR on WorkersEdge SSR globally — potentially fastest TTFB/LCP
adapter-netlifySSR + CDNSimilar profile へ Vercel

暫定日本語案: 向けに blog または docs サイト, adapter-static とともに prerendering gives あなた maximum speed 暫定日本語案: と crawlability. 向けに dynamic サイト, adapter-cloudflare または adapter-vercel put SSR 暫定日本語案: at edge, which できる shrink TTFB と 役立つ Largest Contentful Paint — ただし 暫定日本語案: adapter だけ picks deployment shape. Actual TTFB depends on あなた データ fetching, 暫定日本語案: caching, と runtime’s cold-start behavior, so 測定 deployed ページ rather 暫定日本語案: than assuming adapter alone delivers win.

暫定日本語案: adapter is boundary, ない just deploy target: streaming, filesystem, 暫定日本語案: caching, edge/runtime APIs, リダイレクト, と error handling できる all behave differently 暫定日本語案: 間に adapters. route その looks 正しい とともに ローカル dev サーバー または 暫定日本語案: adapter-node isn’t guaranteed へ behave identically once deployed 通じて 暫定日本語案: adapter-cloudflare または adapter-vercel — テスト production 構築 on actual 暫定日本語案: target, ない just npm run preview.

Sitemaps と robots.txt

暫定日本語案: SvelteKit has no built-in sitemap または robots.txt — like headless setup, あなた 暫定日本語案: 構築 them explicitly.

  • 暫定日本語案: Sitemap, 手動: 作成 src/routes/sitemap.xml/+server.js その returns 暫定日本語案: XML. 追加 export const prerender = true if あなた’re on adapter-static.
  • 暫定日本語案: Sitemap, dynamic: サーバー-rendered endpoint その クエリ あなた CMS/database と 暫定日本語案: returns fresh XML on 各 リクエスト — best 向けに large または fast-changing サイト.
  • 暫定日本語案: Sitemap, packages: svelte-sitemap 暫定日本語案: scans routes post-構築 (向けに SSG), と 暫定日本語案: sveltekit-static-sitemap 暫定日本語案: generates から prerendered routes.
  • 暫定日本語案: robots.txt: drop static file in static/ (served at /robots.txt 暫定日本語案: 自動) または generate it から src/routes/robots.txt/+server.js endpoint. 暫定日本語案: Whichever あなた choose, don’t block あなた .js/.css — Google won’t render から 暫定日本語案: blocked files.

パフォーマンス と Core Web Vitals

暫定日本語案: SvelteKit’s compiler と framework mechanics give あなた structural head start on 暫定日本語案: パフォーマンス, と Core Web Vitals are ランキング input — ただし mechanics themselves 暫定日本語案: don’t guarantee score. compiler outputs vanilla JS とともに no virtual DOM と no 暫定日本語案: runtime library, so typical SvelteKit ページ ships less JavaScript than 暫定日本語案: equivalent React-based app; 自動 per-route code splitting, built-in asset と 暫定日本語案: link preloading, file-hashing 向けに long-lived caching, と edge deployment via 暫定日本語案: several adapters are all 利用可能. 何 あなた 構築 とともに それらの mechanics — ページ 暫定日本語案: weight, 画像 handling, third-party scripts, hydration cost, と deployment 暫定日本語案: target あなた actually choose — still decides あなた 測定 CWV と あなた rankings. 暫定日本語案: Treat framework as removing obstacles, ない as delivering result. 暫定日本語案: SvelteKit docs point あなた at right 測定 ツール: 暫定日本語案: “Google’s PageSpeed Insights and WebPageTest are excellent ways to understand the performance characteristics of a site.” 画像 optimization is 利用可能 via 暫定日本語案: @sveltejs/enhanced-img.

AI crawlers と SSR imperative

暫定日本語案: Here’s 2026 wrinkle older SvelteKit SEO guides miss. Rendering behavior 向けに 暫定日本語案: GPTBot (OpenAI), ClaudeBot (Anthropic), PerplexityBot, と Bingbot fetch behind 暫定日本語案: Copilot is provider- と version-specific, と 現在の provider ドキュメント 暫定日本語案: doesn’t establish one shared render 手順 あなた できる rely on. Treat “generally fetches static HTML without executing JavaScript” as safe planning assumption, ない 暫定日本語案: guarantee について すべての provider forever. CSR route (bare Svelte, または SvelteKit とともに 暫定日本語案: ssr: false) ships すべての one of これらの crawlers 同じ empty shell 最初-fetch 暫定日本語案: Googlebot リクエスト sees; SvelteKit’s デフォルト SSR puts あなた コンテンツ in raw HTML 暫定日本語案: so no crawler has へ depend on render 手順 at all. その’s argument 向けに 保持 暫定日本語案: SSR on 向けに anything あなた want AI systems へ see — ない promise その SSR guarantees 暫定日本語案: inclusion in AI answer, which depends on factors well beyond rendering.

一般的な SvelteKit SEO mistakes

  • 暫定日本語案: Fetching SEO データ in onMount() instead of サーバー load function — metadata 暫定日本語案: isn’t in initial HTML.
  • 暫定日本語案: Shipping SPA fallback mode (ssr: false) 向けに コンテンツ あなた want ranked.
  • 暫定日本語案: adapter-static とともに ssr: false — empty shells, ない prerendered ページ.
  • 暫定日本語案: Blocking JS/CSS in robots.txt — breaks rendering.
  • 暫定日本語案: Skipping trailingSlash configuration — duplicate-コンテンツ variants.
  • 暫定日本語案: Using hash/fragment routing — Googlebot できる’t resolve それらの URLs (SvelteKit’s 暫定日本語案: History API デフォルト already protects あなた here).

暫定日本語案: If あなた’re coming at この から broader framework angle, Svelte/SvelteKit is one of 暫定日本語案: decoupled frontends headless CMS pairs とともに, と rendering-mode logic here 暫定日本語案: is 同じ logic その governs JavaScript SEO generally — それらの topics live alongside 暫定日本語案: この one in cluster.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.