Dynamic rendering

On this page 8

Dynamic rendering is a server-side technique that detects the requesting user agent and serves prerendered static HTML to search engine crawlers while regular visitors receive the normal client-side rendered JavaScript application. In technical SEO, it emerged as a pragmatic bridge for sites whose content depends heavily on JavaScript and which crawlers could not render reliably or quickly enough.

Google described dynamic rendering as a workaround rather than a long-term solution, and its current guidance recommends server-side rendering, static generation or hydration instead. The technique still appears on large legacy applications, so practitioners need to understand how it works, when it is acceptable and where it fails.

How dynamic rendering routes crawlers and users

Dynamic rendering works by placing a routing decision in front of the application that inspects each request and chooses one of two delivery paths. The decision usually relies on the User-Agent header, sometimes combined with reverse DNS verification of crawler IP addresses to block spoofed bots.

When the request comes from a recognized crawler such as Googlebot or Bingbot, the server forwards it to a headless browser renderer, for example a Puppeteer-based service or a prerendering platform. The renderer loads the page, executes the JavaScript, waits for network activity to settle and returns the fully rendered DOM as static HTML. Human visitors bypass this path and download the usual JavaScript bundle.

The following table summarizes the main components of a typical setup and the role each one plays.

ComponentRoleTypical implementation
Bot detection layerClassifies requests as crawler or humanMiddleware rule matching user agent strings
Headless rendererExecutes JavaScript and serializes the DOMHeadless Chromium controlled by Puppeteer
Render cacheStores snapshots to avoid repeated renderingKey-value store or CDN cache with expiry
Origin applicationServes the normal client-side appReact, Angular or Vue single-page application
MonitoringCompares snapshots with the live appScheduled diff checks and log analysis
Components of a dynamic rendering pipeline

Because rendering a page in a headless browser can take several seconds per URL, production systems almost always cache snapshots and refresh them on a schedule or after content changes. The cache is what makes the approach affordable at scale, and it is also the main source of stale content problems.

Why dynamic rendering was introduced

Dynamic rendering was introduced because search engines historically processed JavaScript in a delayed second wave of indexing. Googlebot first crawled the raw HTML, then queued the page for the Web Rendering Service, which could take hours or days when rendering resources were scarce. Content injected by JavaScript was therefore indexed late or not at all.

Other crawlers had weaker or no JavaScript support, and many social media preview bots still read only the initial HTML. For a single-page application with an empty HTML shell, this meant missing titles, descriptions and links for a large part of the crawler population. Dynamic rendering gave such sites indexable HTML without rewriting the front end.

Since Googlebot moved to an evergreen Chromium rendering engine in 2019, the rendering gap for Google has narrowed considerably. The gap remains relevant for some secondary search engines, for AI crawlers that do not execute JavaScript, and for link preview services.

Dynamic rendering compared with other rendering strategies

Dynamic rendering differs from other strategies because it produces two different delivery paths for the same URL, whereas the alternatives serve one consistent output to every client. The comparison below shows where each approach stands on the factors that matter most in JavaScript SEO.

StrategyHTML received by crawlersConsistency for users and botsMaintenance effort
Client-side renderingEmpty shell until JavaScript runsSame output, but late contentLow
Dynamic renderingPrerendered snapshotTwo paths that can divergeHigh, separate pipeline
Server-side renderingComplete HTML per requestIdentical for all clientsModerate to high
Static site generationComplete HTML built in advanceIdentical for all clientsLow for stable content
Hydration or streaming SSRComplete HTML, then interactiveIdentical for all clientsModerate
Rendering strategies and their SEO characteristics

The key distinction is that server-side rendering and static generation improve the experience for users as well, because the first paint contains real content. Dynamic rendering benefits only crawlers and leaves the user-facing performance of the client-side app unchanged, including its effect on page experience signals.

Dynamic rendering and cloaking

Dynamic rendering is not considered cloaking as long as the crawler receives substantially the same content that users see after the JavaScript runs. Cloaking means deliberately showing search engines different content to manipulate rankings, which violates search engine spam policies.

The line is crossed when the snapshot contains extra keywords, hidden links or text that users never see, or when users receive a different page than the one indexed. Minor differences, such as omitted interactive widgets or a removed cookie banner, are generally acceptable. The safest rule is that the rendered DOM for bots should match the rendered DOM for users.

When dynamic rendering is still a reasonable choice

Dynamic rendering remains reasonable only as a temporary measure when a site cannot move to server-side rendering in the near term. The decision table below outlines typical situations and the recommended approach.

SituationRecommended approachReason
New project on a modern frameworkServer-side rendering or static generationOne output for all clients from the start
Legacy single-page app, rewrite plannedDynamic rendering as a bridgeRestores indexing while the rewrite proceeds
Content changes every few minutesServer-side renderingSnapshots would be stale too often
Mostly static marketing pagesStatic site generationCheapest and fastest option
Only preview bots failServer-rendered meta tagsA full renderer is unnecessary
Decision guide for choosing a rendering approach

If dynamic rendering is chosen, teams should define an exit date and treat the renderer as technical debt. Every new feature must otherwise be tested twice, once in the app and once in the snapshot.

Common failures and how to detect them

Most dynamic rendering problems are silent failures: the site looks correct to users while crawlers receive broken or outdated snapshots. Regular verification with the URL Inspection tool, rendered HTML comparisons and server log analysis is therefore essential.

SymptomLikely causeFix
Outdated prices in search resultsSnapshot cache not invalidatedPurge cache on content updates
Empty or partial snapshotsRenderer timeout before data loadsRaise timeout or wait for a ready signal
Soft 404 errors reportedError pages returned with status 200Pass correct HTTP status codes to bots
New crawler not served snapshotsUser agent list out of dateMaintain the bot list and verify by DNS
Server overload during crawlsRendering on every bot requestPre-warm the cache and rate-limit renders
Typical dynamic rendering failures
  • Snapshots must carry the same canonical, hreflang and robots directives as the live page.
  • Internal links in snapshots should be real anchor elements with href attributes, not click handlers.
  • Structured data must be present in the snapshot, not only injected later for users.

Stripped to the essentials

Many modern websites build their pages inside the visitor’s browser with JavaScript. Search engine robots sometimes struggle with that, so they may see an almost empty page. Dynamic rendering solves this by giving robots a ready-made copy of each page, while people still get the normal interactive version.

Think of a restaurant that hands guests a live cooking show but gives a food critic a printed menu with photos of every dish. That works only if the menu matches the real food. Today, most experts prefer building pages that are complete for everyone from the start, so dynamic rendering is best seen as a temporary fix.

Where it is applied

A mid-sized online retailer runs its catalog of about 40,000 product pages as an Angular single-page application. Search Console shows that fewer than half of the product pages are indexed, and many indexed pages lack prices and descriptions. A full migration to server-side rendering is estimated at nine months of development.

The team places a prerendering service behind its CDN that serves cached snapshots to verified search engine bots, refreshing each product snapshot whenever stock or price changes. Within about ten weeks, indexed product pages rise to over 90 percent, and rich results with prices begin to appear. The team keeps the renderer only until the server-side rendered version launches, then removes the dual pipeline to eliminate the maintenance burden and the risk of stale snapshots.