Skip to content
Faisal Mahmud TusherDigital marketing, SEO & analytics
with Faisal Tusher

SEO › Technical SEO

JavaScript SEO

How Google renders JavaScript, where client-side rendering fails search, and how to choose and verify a rendering approach for a modern site.
Guideadvanced7 min readUpdated

What is documented about rendering

Google's own description of the process has three stages: crawling fetches the HTML; the page is placed in a render queue; the rendering service executes it with an evergreen (recent, regularly updated) version of Chromium, and the rendered DOM is what indexing reads. Several properties are documented and matter:

  • Rendering happens after crawling and can be delayed. The gap is described as usually seconds but possibly longer when resources are constrained; content that needs rendering is therefore indexed later than content in the initial HTML.
  • Googlebot does not interact. It does not click, scroll (beyond loading a tall viewport), fill forms or log in. Content behind any of those does not get rendered.
  • Resources that are blocked or fail do not load. Scripts and data requests disallowed in robots.txt, returning errors or timing out leave the page partially rendered.
  • Rendered HTML is the source of truth. Meta robots tags, canonical links and titles that JavaScript changes are read from the rendered version — which also means JavaScript can accidentally remove or contradict them.
  • State is not persisted. Googlebot renders stateless: no cookies carried over, no local storage from a previous visit, a fresh session each time.

What is not documented is any precise timeout or the exact rendering budget per site; statements about those are inference from observation and should be treated as such.

Failure modes

Content that needs execution

The classic case: a page's HTML contains an empty container and a script that fetches content and injects it. If rendering succeeds, the content is indexed — late. If any dependency fails, the page indexes as empty, and Google may treat it as a soft 404 (a "not found" page returning a success code). The same applies to titles and descriptions set by script, structured data injected at runtime and canonical tags added client-side.

Navigation implemented as elements with click handlers that update the view, or <a> elements without an href, or links with javascript: hrefs, are not followed. Google documents that it follows <a> elements with an href attribute pointing to a resolvable URL. Pagination, "load more" buttons and tab panels that reveal content on click are the common sources of unreachable pages and invisible content.

URLs without views, views without URLs

A single-page application that keeps one URL while the view changes exposes one page to the index. Fragment URLs (#section) are not treated as separate pages. Each indexable view needs its own path, handled by the history API, and each path must render its content on direct load — not only when reached by navigating within the app.

Blocked resources

A script bundle or an API endpoint disallowed in robots.txt, served from a host that blocks bots, or protected by authentication, leaves the render incomplete. The URL inspection tool lists resources Googlebot could not load; a surprising share of JavaScript SEO problems are a single disallowed path.

Hydration and consistency

Frameworks that render on the server and then "hydrate" on the client can produce two different versions — the server HTML and the client's re-rendered DOM. Where they diverge (different titles, content, links), the indexer reads whichever the rendering produced; where hydration throws an error, the client may wipe the server content. Consistency between the two is a testable requirement.

Lazy loading and viewport

Content loaded when scrolled into view may never load for a crawler that does not scroll. Google documents support for lazy-loading that triggers when content enters the viewport (for example via IntersectionObserver) and advises against patterns that require a scroll event; it also documents native loading="lazy" for images as supported. Infinite-scroll lists need paginated URLs behind them.

Rendering strategies compared

StrategyWhat the crawler receivesSEO riskTypical cost
Static generation (pre-built HTML at deploy)Complete HTMLLowest; content and links present immediatelyBuild complexity; freshness depends on rebuilds
Server-side rendering (HTML built per request)Complete HTMLLow; same as static with fresher dataServer load; caching needed
Hybrid / islands (server HTML with client interactivity on parts)Complete HTML for content; scripts for widgetsLow if critical content is server-renderedFramework discipline about what is client-only
Client-side rendering (empty shell, content via script)A shell; content only after renderingHighest; delayed, partial or failed indexingLowest server cost; highest SEO exposure
Dynamic rendering (pre-rendered HTML to bots, app to users)A rendered snapshotMedium; a workaround Google no longer recommends; cloaking risk if versions differ in contentExtra infrastructure to maintain

The practical rule, consistent with Google's guidance: anything that must be indexed — primary content, internal links, titles, canonicals, structured data — belongs in the HTML the server sends. Interactivity can be client-side. This site follows the rule: every content page is statically generated with its text, links and metadata in the HTML, and interactive widgets hydrate on top; the rendering approach is documented in the site's own architecture notes.

The rendering strategy is often fixed by the platform, which is why the guide to choosing a CMS for SEO tests what a candidate sends in its server response before the decision is made.

Testing what Google sees

  1. URL inspection, live test (GSC): fetch and render the URL as Googlebot, view the rendered HTML and the screenshot, and read the list of page resources that failed to load.
  2. Compare rendered HTML with expected content. Search the rendered source for the headline, the body text, the internal links and the metadata. Missing items are the problem list.
  3. Disable JavaScript in a browser and load the page. What remains is what is indexed if rendering fails. For a client-rendered site this is an empty page, which is the risk made visible.
  4. Check robots.txt against every resource the page loads, particularly API endpoints and script hosts.
  5. Crawl with and without rendering using a site crawler that supports both modes, and diff the link counts and content; pages whose links appear only in rendered mode depend on execution. Choosing between the modes, and the other settings that decide what such a crawl can show, is covered in configuring a site crawl.
  6. Monitor indexing coverage for JavaScript-heavy templates separately in Search Console; a widening gap between discovered and indexed URLs is the early signal.
Illustrative example — not a real result

A marketplace whose listings vanished

A marketplace rebuilt its front end as a client-rendered application. Traffic to listing pages fell over the following weeks. The URL inspection tool showed listing pages rendering with a header and an empty results container: the API that supplied listings lived on a subdomain whose robots.txt disallowed all bots, so the fetch failed and the pages indexed as near-empty, with many reported as soft 404s. Allowing the API path restored rendering, but the team also moved listing content to server-side rendering so that indexing no longer depended on the render queue, and kept the client application for filtering and interaction.

A pre-release checklist for JavaScript changes

Before any release that changes how pages render:

  • The important content is present in the server response or in the rendered HTML the inspection tool shows, for each affected template.
  • Every navigation and content link is an anchor with an href to a real URL.
  • Every view that should be indexable has its own URL that returns the content when fetched directly.
  • Title, meta description, canonical and robots directives are correct in the initial HTML and are not changed by script after load.
  • Resources needed to render are not blocked in robots.txt.
  • Lazy-loaded content that should be indexed is reachable without scrolling or user action.
  • The rendered page and the server response agree.
  • A crawl of staging in JavaScript-rendering mode matches a crawl in plain HTML mode on the counts that matter.

For a new template or feature, the tutorial on writing SEO requirements for developers puts these expectations into the specification, with test URLs, before development starts.

JavaScript and the rest of technical SEO

Rendering interacts with every other technical topic. Scripts are the usual cause of poor Core Web Vitals (long tasks, late content, layout shifts); client-side navigation is where site architecture breaks (links that are not links); runtime-injected canonicals and meta robots are where crawling and indexing controls go wrong; and rendering costs crawl capacity, which matters on large sites (Crawl Budget). A framework migration is a site migration in everything but name and deserves the same pre-launch checks.

Common mistakes

  • Critical content injected by script. Indexed late or not at all; soft 404s when it fails.
  • Click handlers instead of anchors. Unreachable pages.
  • One URL for many views. One indexed page for a whole application.
  • API or script hosts blocked in robots.txt. The single most common cause of empty renders.
  • Canonical and meta robots set or changed client-side. Contradictory or missing signals.
  • Testing only in a browser with JavaScript on. The crawler's view is different.
  • Dynamic rendering as a permanent architecture. A workaround with its own maintenance and cloaking risks.

The technical SEO audit tutorial includes the rendering checks above as one of its steps; the author's technical SEO page lists rendering among the pillars of a technical review.

Frequently asked questions

Can Google index a single-page application?

Yes, if each view has its own URL, the content renders without user interaction, and links are real anchor elements. Google renders JavaScript. The risks are delay, partial rendering and anything that depends on a click, scroll or login.

Is dynamic rendering still recommended?

Google now describes dynamic rendering — serving a pre-rendered version to crawlers and the JavaScript app to users — as a workaround rather than a recommended long-term solution. Server-side rendering, static generation or hydration-based frameworks are preferred.

How do I know what Google rendered?

Use the URL inspection tool in Search Console: 'Test live URL' shows the rendered HTML and a screenshot as Googlebot produced them, plus any resources it could not load. Compare the rendered HTML with what you expect; if content is missing, that is what the indexer did not see.

Terms used on this page

Tools to try

Frameworks

Where this page is used

Part of these learning paths

Also related

Sources

  1. Understand JavaScript SEO basics — Google Search Central
  2. Fix search-related JavaScript problems — Google Search Central
  3. Dynamic rendering as a workaround — Google Search Central

Related