Question

How to prerender a v0 app

Prerendering means each route is saved as a finished HTML file when you build, so a crawler gets the words without running JavaScript. If your v0 output lives in Next.js, you do not need it: Next renders on the server already, and a blank page means something opted that out, usually a "use client" at the top of the file or data fetched in useEffect. If you pasted v0 output into a plain Vite app, that app has no server step at all, and a prerender plugin is what adds one.

If the project is Next.js

Do not add prerendering, remove whatever turned rendering off. Push the "use client" directive down from the page to the one interactive component that needs state or an event handler. Fetch data by awaiting it in the server component instead of loading it in useEffect, so it is part of the document. And export metadata rather than setting document.title after mount, so the tags are in the HTML and not only in the tab.

If the project is plain Vite

The rendering came from Next.js, not from the components, so the same code in a Vite app is a client-only bundle. Add a prerender plugin to the build: after the bundle is written it walks your public route list and saves real HTML for each one. The components still hydrate on top, so the app behaves exactly as it did.

Prerendering is not server-side rendering

Prerendering happens once, when you build: each route is saved as a finished file and the host serves that file to everyone. Server-side rendering builds the page per request. For a marketing site whose content changes when you deploy, prerendering is the simpler of the two and reads identically to a crawler. Reserve server rendering for content that changes between deploys.

The flicker trap

A prerendered page still hydrates: the bundle loads and takes over. If the markup you saved disagrees with what the components render, the page flickers or the console fills with hydration warnings. Prerender the real components rather than a hand-written copy of them, and the first paint and the app will agree.

Which routes are worth it

The ones you would want an engine to quote: home, pricing, anything that explains what the product does. Routes that need an account produce nothing useful without one, so leave those to the client. The full v0 and Next.js fix list is on the v0 page.

More questions

All questions →

Scan your site

Free, no account. You get the full checklist and your score.

Only scan sites you own or are authorised to scan. Free scans are limited. Terms

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.