# Prerendering

Prerendering is producing a page's HTML before a visitor or crawler asks for it, usually at build time, so the server can send the finished page instead of an empty shell that JavaScript fills in. It is the lightest way to make a single page app readable by crawlers that do not run JavaScript. The same word is also used for rendering on request for crawlers only, which Google calls dynamic rendering and treats as a workaround.

Updated 2026-09-23 · Source: https://porteur.ai/glossary/prerendering

## The two meanings of prerendering

- Static prerendering: at build, each route is rendered once and saved as an HTML file. Every visitor and every crawler gets the same file. The browser then hydrates it into the interactive app.
- Prerendering for crawlers: at request time, a service detects a bot, renders the page in a headless browser and sends it the result. Human visitors get the client-rendered app. Google documents this as dynamic rendering.

When a hosting platform or a framework says it prerenders, find out which one it means. The first is a normal way to build a site. The second is a patch over a client-rendered one.

## Prerendering vs SSR and dynamic rendering

| Approach | When the HTML is made | Who gets it | Fits |
| --- | --- | --- | --- |
| Static prerendering | Once, at build | Everyone | Pages that change with a deploy: marketing, pricing, docs |
| Server-side rendering | On each request | Everyone | Pages built from data that changes between deploys |
| Dynamic rendering | On request, for bots | Crawlers only | A stopgap for a client-rendered app |
| Client-side rendering | In the browser | Whoever runs the JavaScript | Pages behind a login |

Google recommends server-side rendering, static rendering or hydration, and describes dynamic rendering as a workaround and not a recommended long-term solution. Static prerendering is on the recommended side: it is static rendering by another name.

## Why it matters for a single page app

A client-rendered app sends an HTML file with no text in it. Google renders it later, in a second pass; most AI crawlers never do. Prerendering the public routes puts the words, the title and the links in the first response, so every crawler reads the page the moment it fetches it.

You do not have to prerender the whole app. The dashboard behind the login can stay client-rendered; only the pages you want found need it.

## How to check prerendering works

```bash
# The text should be in the response, with no JavaScript run
curl -s https://yourproduct.com/pricing | grep -c 'a sentence from your pricing page'
curl -s https://yourproduct.com/pricing | grep -o '<title>[^<]*</title>'
```

If the page is prerendered for crawlers only, curl with an ordinary user agent will show the empty shell, and a faked crawler user agent may too if the service only serves verified crawlers. Use the live test in Search Console's URL Inspection instead: its rendered HTML is what Google received.

## When prerendering becomes cloaking

Serving crawlers content that differs materially from what users see is cloaking under Google's spam policies. Prerendering the same content is not. The page a bot receives must carry the same text, links and offers as the page a person sees once the app has loaded.

> The trap is drift: a prerender cache that holds last month's prices while users see this month's, or a bot version stuffed with extra text. Keep one source for both, and compare them after each release.

## Questions

### Is prerendering good for SEO?

Static prerendering is: every crawler gets the full page in the first response, with nothing to run. Prerendering for crawlers only also works, but Google treats it as a workaround and it adds a second version to keep in step.

### What is the difference between prerendering and SSR?

Prerendering makes the HTML ahead of the request, usually once at build. Server-side rendering makes it on every request. Both send crawlers a finished page; SSR costs a running server and fits content that changes between deploys.

### Is prerendering cloaking?

Not when the content is the same. It becomes cloaking when the version served to crawlers differs materially from what users see.

### Do I need a prerendering service?

Usually not. If your framework or build tool can generate the public routes as HTML, do that. A crawler-only service is a bridge while you move a client-rendered app to static or server rendering.

## Read next

- [Single page application SEO: rendering, routes and status codes that Google can read](https://porteur.ai/guides/single-page-application-seo): Are single page applications bad for SEO? The six failure points with a test for each, the fixes ranked by effort, and host rules for real 404s.
- [React SEO: making a React app readable by Google and by AI crawlers](https://porteur.ai/guides/react-seo): Is React bad for SEO? How to tell what your React app sends crawlers, set per-route titles in React 19, prerender routes and avoid the React traps.
- [Lovable SEO: why older Lovable sites were not indexed, and what to check now](https://porteur.ai/guides/lovable-seo): Is Lovable good for SEO? It depends on the project's age. How to tell which you have, test what crawlers get, and the checklist still yours to do.
- [JavaScript rendering: what Google sees, what the AI crawlers do not](https://porteur.ai/guides/javascript-rendering-and-seo): Google renders JavaScript in a second pass and the AI crawlers do not render it at all. Here is what breaks, how to test it, and what to change.
- [Rendering](https://porteur.ai/glossary/rendering): Rendering is how Google executes your JavaScript and CSS after crawling HTML, which can delay indexing. Here is what to check and how to fix it.
- [Cloaking](https://porteur.ai/glossary/cloaking): Cloaking is showing Google different content than users. See what counts, what is safe, how to check your site, and how to fix risky setups.
- [JavaScript SEO](https://porteur.ai/glossary/javascript-seo): What JavaScript SEO means, how Googlebot renders, what breaks, how to fix links and content, and how to choose SSR or SSG so pages index fast.

Paste your URL into the free check: in about thirty seconds it reads your site, the searches around it and the rivals on them, and shows three findings whole. Free check: https://porteur.ai/
