← All notes

June 2026

Prerendering a Vue SPA for SEO

A client-rendered SPA serves an empty page to crawlers and social previews. Static prerendering fixes SEO without changing framework.

A classic single-page app ships an empty container, then injects content in JavaScript. Engines handle it poorly, and link previews, which run no script, see nothing.

The client-rendering problem

Without initial HTML, the title, description and content only exist after execution. Indexing becomes slow and fragile, and social shares are broken.

Pre-generate at build time

Static prerendering (for example with vite-ssg) generates a full HTML page per route at build time, while keeping client interactivity after hydration. Each page carries its own tags, canonical and language alternates.

You get the SEO of a static site with the comfort of a SPA. This is exactly the approach used for this site.