
SPA SEO and AI Crawlability Explained
Client-only rendering can hide your content from search crawlers and AI answer engines entirely. Why server-rendered HTML (SSR, SSG, or RSC rendered to HTML) fixes discovery — and what a crawler actually sees.
TL;DR: A single-page application that renders only in the browser can serve an empty page to the crawlers and AI answer engines that do not execute JavaScript — which makes discovery loss a rendering decision, not a content problem. This article explains why client-only HTML disappears from search and AI citation, why server rendering fixes it, and where the discovery angle stops and the accessibility and web-experience angles take over. The takeaway is a rule: choose the rendering mode per route with discoverability as an explicit input, and verify what a crawler actually sees.
The SPA crawlability problem
A classic single-page application sends a near-empty HTML shell and a JavaScript bundle; the browser builds the page after the bundle loads and runs. Google's crawler can execute JavaScript: Google documents that Googlebot queues every page that returns a 200 HTTP status code for rendering, unless a robots meta tag or header tells Google not to index the page, and that a page may wait in that queue for a few seconds or longer until Google's resources allow a headless Chromium to render it. Other search engines may choose to ignore JavaScript, and those that do won't see JavaScript-generated content. The first response a crawler sees is the empty shell; when it comes back to run the bundle depends on resources you do not control. Google's crawl-budget guide, written primarily for very large and frequently updated sites, says that if Google can load and render pages faster, it might be able to read more content from a site; a working hypothesis, not a documented rule, is that the wait for rendering weighs most on large or less popular sites. Treating "the crawler will execute it eventually" as a guarantee is the optimistic reading of a best-effort process.
The riskier audience is the one that does not run scripts at all. Some AI crawlers read the raw HTML of a URL as delivered and do not run the client bundle that would hydrate it. That is an observed pattern rather than a documented rule: a December 2024 analysis published on the Vercel blog (Vercel is the company behind Next.js) found that the AI crawlers it measured from OpenAI, Anthropic, Meta, ByteDance and Perplexity did not render JavaScript, while Google's Gemini, which uses Googlebot's infrastructure, and AppleBot did; Microsoft Copilot was excluded from the study. Crawler behavior can change, so treat that as a snapshot rather than a permanent property. To a fetcher that does not run scripts, a client-only route is a blank document with a loading spinner, and a blank document contributes nothing to an answer and earns no citation. To the extent that people reach content through AI answers, this is a failure mode client-only sites need to plan for rather than an edge case.
The symptom is easy to misread. The team sees URLs that are technically indexed and concludes discovery is fine, but a consumer that never ran the scripts may hold only the empty shell. Google documents that it uses the rendered HTML to index a page; for engines that do not run scripts, a working hypothesis, not a documented rule, is that such a page can be present in their records yet absent from their answers, with nothing in it to rank. On a large catalog or content site, a further working hypothesis is that the gap widens as the number of URLs grows, since more of the site depends on a rendering step it does not control. In that case the site appears to be in the index and is functionally invisible at the same time.
The crucial point is where the failure originates. The content exists; the team wrote it; it is in the component tree. What is missing is server-emitted HTML, and that absence is a consequence of the rendering mode the project chose, not of the content itself. Google's JavaScript SEO basics describe how its own crawler processes JavaScript in three phases — crawling, rendering, and indexing — with pages queued for rendering, where they can wait a few seconds or longer. The wider implication for 2026 is sharper: when an answer engine that does not render at all is part of your discovery surface, the deferred rendering step is not a safety net you can lean on.
Why server rendering fixes it
Server rendering removes the dependency on a later rendering step. SSR builds the HTML per request and SSG builds it at deploy time, so in both cases the response that leaves the server already contains the meaningful content. React Server Components (RSC) render component output ahead of time, at build time or per request, in an environment separate from the client app; React's documentation notes that the result can optionally be server-side rendered (SSR) to create the initial HTML for the page, so RSC output arrives as HTML only when it is also rendered to HTML, per request (SSR) or at build time (SSG). The Next.js App Router is one example: layouts and pages are Server Components by default, and Next.js uses Client Components and the RSC Payload to prerender HTML (as of Nov 2026, Next.js docs). A crawler or an answer engine reads that HTML immediately, with no JavaScript execution required, because the work of turning components into HTML happened before the response was sent rather than after it arrived. Streaming SSR keeps this property only in part: React flushes the shell — the part of the page outside any Suspense boundary — early and streams the rest into the same response as its data resolves, while interactivity hydrates afterward. If server rendering is aborted after a timeout, React sends the remaining loading fallbacks as HTML and attempts to render the rest on the client, so slow data can still leave content behind the bundle; React's documentation describes waiting for all content to load (onAllReady) for crawlers and static generation.
The rendering spectrum itself — the full set of modes and their trade-offs — is this topic overview's subject, not this article's. The narrow point here is the discovery property: any mode that emits server-rendered HTML satisfies a non-executing fetcher, and any mode that does not, does not. Google's rendering-on-the-web taxonomy lays out the modes; the lever for discovery is which of them emits content the fetcher can read without running scripts. This is also why hydration is a discovery concern and not only a performance one: if the server response is a shell and the real content only appears after hydration, the page is discoverable in proportion to how reliably each consumer runs your JavaScript — which, for the strictest consumers, is not at all.
Answer-engine crawlability specifically
The AI-discovery case tightens the requirement rather than changing it. An AI crawler that fetches raw HTML can only cite what is in that HTML. If the substantive content of a route arrives only after client hydration, the engine has nothing to extract and nothing to attribute, so the page is effectively absent from the answer even when it ranks in traditional search. Google's own documentation on dynamic rendering describes it as a workaround it no longer recommends and advises server-side rendering, static rendering, or hydration instead, which points at the same root cause: content that is not present in the served response is content the fetcher cannot reliably use.
There is a broader story about how page-experience and quality signals feed AI citation as a whole — the cascade from usability to retrieval to being cited. That belongs to the AI Search topic, which treats the web-experience-to-citation link as its own subject; duplicating it here would blur this article's scope and double-cover ground that already has an owner. The frontend-specific takeaway is narrower and more actionable: for a crawler that does not run JavaScript, the rendering mode decides whether there is any content to read, and metadata cannot substitute for it. Meta tags and structured data help an engine interpret content it can already read; they do nothing for content that was never in the served HTML. Reaching for a head-tag fix when the body is empty is treating the symptom and ignoring the rendering decision that caused it.
Self-containment is the related discipline. Server-rendered HTML is necessary but not sufficient if the substantive content is hidden behind an interaction the fetcher will never perform — a tab that loads its panel on click, an accordion whose body is injected on expand, an infinite list that fetches the first real items only after a scroll event. A fetcher that reads the response once, without interacting, sees only what is in that first response. The discovery-safe pattern is to server-emit the meaningful content of an indexable route in the initial HTML and treat progressive enhancement as an addition to it, never as the thing that first makes it readable.
Accessibility overlap, not duplication
Client-side routing has a second, separate consequence that shares the same root cause. When a client-side router changes views by calling history.pushState() instead of loading a new document, the browser does not move focus: the HTML standard's steps for pushState() update the URL and session history but include no focus change. With the newer Navigation API (Baseline 2026, newly available since January 13, 2026, as of Nov 2026, per web-features), a navigation handled with intercept() resets focus after the transition by default — to the document's autofocus element, or else the body — unless the page opts out with focusReset: "manual" or focus already moved during the navigation; a router built on pushState() alone gets no such help. In that setup, keyboard and screen-reader users can be left with focus stranded on the old view after a route change, with no announcement that the page content changed at all. That is a real defect, and it originates from the same client-only navigation model that causes the crawlability gap: the browser never performed a document-level transition, so neither the crawler nor the assistive-technology layer got the signal it expects.
The two problems are siblings, not the same problem, and they have different owners. Discovery is this article's scope: can a non-executing fetcher read the route. Focus-management depth — the techniques, the WCAG criteria, the SPA-specific routing patterns — lives in the accessibility topic, which treats it as its own article. The honest framing is to name the shared cause once, route the reader's attention to where each depth lives, and not re-explain focus management here. One rendering and routing decision creates two downstream obligations; this article owns the discovery one and points at, rather than absorbs, the accessibility one.
What to verify
Discovery is testable, and the test is specific: look at the HTML a non-executing fetcher receives, not the DOM after hydration. The dev-tools Elements panel shows you the hydrated tree, which is exactly the view that hides the problem.
- For each indexable route, fetch the raw server response and confirm the substantive content is present in that HTML — not only in the hydrated DOM you see in browser developer tools.
- Treat "an answer engine that does not run JavaScript" as a real consumer of your indexable routes, and make sure those routes are server-rendered into HTML (SSR or SSG, including React Server Components output that is rendered to HTML), not client-only.
- Keep client-only rendering for surfaces that genuinely do not need discovery — authenticated app shells, internal tools — and do not pay the SSR cost where no crawler will ever look.
- Make discoverability an explicit input to the per-route rendering decision, alongside latency and interactivity, rather than something noticed after launch when traffic does not arrive.
- Note the shared client-routing root cause so the focus-management obligation is tracked too — its depth belongs to the accessibility topic, but the decision to address it is made here.
The rule that survives every framework cycle: decide rendering per route with discovery named as an input, and verify against the HTML the fetcher actually sees. SPA crawlability is not a plugin you add later; it is a rendering choice you make on purpose, route by route.