The SEO Problem Every Lovable Site Has (And How to Fix It) | Hillcraft

Lovable builds React SPAs — and crawlers can't see your metadata. Here's the build-time pre-rendering fix, with a reusable prompt.

If you've built your marketing site on Lovable, there's a good chance you have an SEO problem you don't know about yet. Lovable builds React single-page applications, which means crawlers that don't execute JavaScript — including Google, Facebook, LinkedIn, ChatGPT, and Perplexity — see only an empty HTML shell with no metadata.

The Problem

When a crawler visits your Lovable site, it receives the base index.html file. React hasn't loaded yet, so the title, description, Open Graph tags, and page content are all missing. Your carefully written SEO metadata only exists inside React components that the crawler never executes.

The Fix: Build-Time Pre-Rendering

The solution is a custom Vite plugin that runs after every production build. It reads dist/index.html, creates a copy for each route, and injects the correct title, meta, and Open Graph tags. Real users still get the normal SPA experience — the client-side router takes over once JavaScript loads. The article includes a reusable prompt you can paste into Lovable to implement this fix on your own site.

Book a discovery call with Hillcraft