Handbook/Ch. 3
Handbook · Chapter 3

Rendering & JavaScript SEO

Googlebot does not scroll or click, and it wipes state between page loads. Rendering decides everything for JS sites: SSR/SSG is a requirement, not an option. The WRS pipeline, the noindex-in-HTML trap, lazy loading, and framework guidance.

The WRS pipeline (three phases, sequential)

  1. Crawl — parses raw HTML, queues <a href> links. Only 200 proceeds.
  2. Render — queued for WRS (evergreen headless Chromium); JS runs, DOM mutates, rendered HTML produced. Queue delay usually short, not guaranteed.
  3. Index — rendered HTML indexed; new links fed back.

WRS behaviors that trip people up:

JavaScript SEO rules

window.history.pushState({}, '', hrefUrl);   // DO — real crawlable URL
// DON'T: fragment routing (#/products) — AJAX-crawling scheme is dead

Dynamic rendering — DEPRECATED

⚠️ Google deprecated dynamic rendering ("a workaround, not a long-term solution"). Use instead: SSR (HTML per request — Next.js app/getServerSideProps, Astro SSR), static rendering/prerendering (build time — Next.js SSG, Astro default static), and hydration (ship HTML then attach JS — the standard Next.js/Astro model). This is where accessibility and crawlability are jointly won or lost.

Lazy loading

Core rule: Googlebot does not scroll or click. All content must load when it enters the viewport or already be present. Approved: native loading="lazy", IntersectionObserver, viewport-detection libs that don't need interaction. DON'T lazy-load primary content.

const io = new IntersectionObserver((entries, obs) => {
  entries.forEach(e => { if (e.isIntersecting) { e.target.src = e.target.dataset.src; obs.unobserve(e.target); } });
});
document.querySelectorAll('img[data-src]').forEach(img => io.observe(img));

next/image note: lazy-loads by default; for above-the-fold LCP images set priority (loading="eager" + fetchpriority="high"). Testing: URL Inspection → Rendered HTML (confirm src populated); or drive Puppeteer with a tall viewport and assert content in the DOM.

Framework guidance (Next.js & Astro)

Sources

  1. Google Search Central — Understand the JavaScript SEO basics
  2. Google Search Central — Fix search-related JavaScript problems
  3. Google Search Central — Fix lazy-loaded content
  4. web.dev — Rendering on the web
Related
JavaScript SEO: How Google Renders JS Pages Next.js SEO: Rendering, Metadata & Render-Diffs Mobile-First Indexing: How to Pass Parity Checks Soft 404s: What They Are and How to Fix Them content.thin

Audit your own site — free

156 checks, internal PageRank, render-diff. No signup, results in ~30s.

Scan your site →