Dynamic Rendering
Dynamic rendering is a technique that serves search bots a server-prerendered static HTML version of a page while giving regular users the original JavaScript-driven version. Once used as a workaround for indexing JavaScript content, it is no longer recommended by Google as a long-term solution.
- Dynamic rendering inspects the requesting client's User-Agent and serves search bots a prerendered static HTML page while serving users the standard JavaScript version.
- It emerged as a workaround for an era when JavaScript-generated content was often indexed poorly by crawlers.
- Google now explicitly calls it "a workaround and not a long-term solution," recommending server-side rendering (SSR), static rendering, or hydration instead.
- Because it emits different content to bots and users, it carries significant operational complexity and resource overhead, and it can conflict with the principle of serving identical content to everyone.
- It is distinct from server-side rendering: SSR returns the same server-rendered output to every visitor, whereas dynamic rendering splits bots from users and sends each a different response.
Overview
Dynamic rendering is an approach that emits two different responses for the same URL depending on who is requesting it. Search engine crawlers receive static HTML that was prerendered on the server, while real users receive the original version in which JavaScript executes in the browser.
The technique arose to work around a problem common on sites like single-page applications (SPAs), where much of the content is generated by client-side JavaScript. Crawlers that could not fully process that JavaScript would index the pages with empty or incomplete body content.
How It Works
According to Google's official documentation, dynamic rendering follows this flow.
- User-Agent detection: The web server examines the User-Agent of each incoming request to determine whether it comes from a search bot or a regular user.
- Request routing: Requests from crawlers that cannot process JavaScript or that require specific capabilities are sent to a rendering server, while other users and capable crawlers are served as usual.
- Static HTML response: The rendering server converts the dynamic content into static HTML and returns it to the crawler, while users continue to receive the original page where JavaScript runs.
Google's Current Position
Google no longer recommends dynamic rendering. The title of the official documentation has itself been changed to "Dynamic Rendering as a workaround," and a warning at the top states that "dynamic rendering was a workaround and not a long-term solution for problems with JavaScript-generated content in search engines."
Google offers three alternatives.
- Server-side rendering (SSR): The page is rendered on the server and then served identically to both bots and users.
- Static rendering: The page is prerendered at build time and served as static files.
- Hydration: The initial HTML is sent first, after which JavaScript layers interactivity on top.
The reason dynamic rendering is discouraged is that emitting different content to bots and users inherently adds operational complexity and the resource burden of a separate rendering server, while risking divergence between the two responses. Google advises prioritizing modern rendering approaches that deliver consistent content to every visitor.
Distinction from Server-Side Rendering
Dynamic rendering is easily confused with server-side rendering, but the two differ at their core. Server-side rendering makes no distinction between bots and users and delivers the same server-rendered output to everyone. Dynamic rendering, by contrast, uses the User-Agent to split requesters apart, returning static HTML to bots and the JavaScript version to users. Dynamic rendering is therefore not a subtype of SSR but a separate workaround built on branching logic.
References and Sources
- Dynamic Rendering as a workaround — Google Search Central
- Google no longer recommends using dynamic rendering for Google Search — Search Engine Land
- Google Says Dynamic Rendering Is A Workaround and Not A Long-Term Solution — Search Engine Roundtable
- Dynamic Rendering Is Not a Long-Term Solution — Onely