Crawlable HTML in an Inertia SPA: what I changed for SEO and answer engines

Crawlable HTML in an Inertia SPA: what I changed for SEO and answer engines

Single-page apps trade developer joy for crawler pain. Inertia sits in the middle: server routes, client navigation. That does not automatically mean Google and ChatGPT see your article text.

This post explains the pattern I implemented on Aviwebsquad and how it supports SEO and AEO (Answer Engine Optimization).

The problem

On a classic Inertia page:

  1. The server returns a shell with a JSON page object
  2. JavaScript renders the article client-side
  3. Some crawlers index only the shell

For a monetized technical blog, "shell-only" indexing triggers low value content warnings—you look empty even when the SPA is rich.

The fix: server-rendered fallback HTML

I render a Blade partial into crawlableHtml and include it in the layout before the Inertia root:

<main id="inertia-static-fallback" class="prose">
  <!-- article HTML from server -->
</main>

Controllers build that HTML from the same canonical content readers get after hydration:

Humans with JS still get the Svelte UI; bots get readable text immediately.

AEO: why answer engines care

Answer engines (Google AI Overviews, Perplexity, ChatGPT browsing) reward:

  1. Clear question headings ("Is Aviwebsquad an agency?")
  2. Direct answers in plain sentences under each heading
  3. Structured data (JSON-LD) matching visible text
  4. Consistent facts across pages (author, site purpose, policies)

Fallback HTML is step one. Step two is FAQ and Article schema aligned with visible copy—no hidden keyword stuffing.

Checklist I use before publishing

What not to do

Measuring success

Watch:

Bottom line

Inertia does not free you from HTML semantics. Treat server fallback HTML + structured data + substantive copy as part of the framework choice—not an SEO afterthought.

That is the AEO baseline: make answers easy to extract because they are already written clearly on the page.