03.03 · Walkthrough
Rendering: How an SPA Goes Invisible
Diagnose whether content exists in the HTML, after rendering, or nowhere a crawler will see it, and pick between SSR, prerendering and hydration for a given page.
An SPA becomes invisible when its important text and links exist only after client-side JavaScript, failed API calls, blocked resources, or user interaction. The practical fix starts by locating where the content first appears: server HTML, rendered DOM, or nowhere reliable, then choosing SSR, prerendering, static generation, or hydration accordingly.
What this lesson answers
- why is my SPA not indexed
- how to compare HTML and rendered DOM
- SSR or prerendering for SEO pages
Notes
A crawler can only index what it can retrieve and understand. With a traditional server-rendered page, the important text and links are already in the first HTML response. With many SPAs, the first HTML response may be a nearly empty shell, and the real content appears only after JavaScript downloads, runs, calls APIs, and mutates the DOM. The diagnostic question is not “does it work in my browser?” but “where does the meaningful content first exist?”
A useful mental model is three snapshots. First is view-source or the network response: what the server sent.
References
Common questions
- Why can an SPA be visible in Chrome but not indexed?
- A normal browser session proves the app can render for a user, not that a crawler can retrieve the same content reliably. If the page depends on JavaScript execution, API responses, client routing, timing, location, authentication, or unblocked resources, a crawler may see only an empty shell or incomplete DOM.
- How do I check whether SEO content is in the initial HTML?
- Inspect the network response or page source, not just the Elements panel. The initial HTML is what the server sent before JavaScript changed anything. Then compare it with the rendered DOM after scripts run. If important copy and links only appear after rendering, indexing depends on crawler JavaScript support.
- When should I use SSR instead of prerendering?
- Use SSR when the indexable HTML must reflect request-time data, such as frequently changing availability, personalised but crawl-safe variants, or content that cannot be generated ahead of time. Use prerendering or static generation when pages are known in advance and can be produced before crawlers request them.
Short definition: what is Rendering: How an SPA Goes Invisible?
