SEO glossary

JavaScript SEO

Definition

JavaScript SEO is the work of making sure content your code builds in the browser survives the trip into Google's index. Google renders JavaScript, but in a separate queued pass after crawling — so client-rendered content can sit unindexed for days. Most AI crawlers don't render JavaScript at all.

Updated 26 July 2026 · Written by the Last Agency team · See what SEO actually costs

The short version

  • Google's pipeline is crawl, render, index — and render sits in a queue. Server-rendered content skips the queue entirely.
  • View Source shows what the server sent. The Elements panel shows what the browser built. Only URL Inspection shows what Google got.
  • A <div onClick={...}> is not a link. Google follows <a href> and nothing else.
  • Most AI crawlers — GPTBot, ClaudeBot, PerplexityBot — don't execute JavaScript, which makes an empty first response more expensive in 2026 than it was in 2020.

Crawl, render, index — and the queue in the middle

For a plain HTML page, Google fetches the URL and has everything at once: headline, copy, links, metadata. One step.

For a JavaScript-dependent page it's two. Googlebot fetches the URL, finds an effectively empty shell, and puts the page into a render queue. Later a headless Chromium runs the JavaScript, produces the DOM, and *that* is what gets indexed. Google says most pages are rendered within minutes of being crawled — but it's a queue with resource limits, and the tail is where the pain lives.

Two consequences. Indexing is delayed, which hurts anything time-sensitive. And links that exist only in the rendered DOM aren't discovered until the render happens, so your deeper pages are delayed by the same queue, recursively.

CSR, SSR and static — what each one ships

The rendering strategy decides what's in that first HTML response, which decides everything else.

  • The test is one line: curl -s https://yoursite.com/page | grep "your headline". If the headline is there, the part that matters is server-rendered. It isn't a framework argument — a React app can be fully server-rendered, and a WordPress theme can hide its content behind a client-side fetch. See Next.js versus WordPress.
Rendering strategies and what Googlebot receives on the first request.
StrategyFirst response containsSEO risk
Client-side rendering (CSR)An empty <div id="root"> and a script bundle.Highest. Everything waits on the render queue; non-rendering crawlers get nothing.
Server-side rendering (SSR)Fully-formed HTML, generated per request.Low. Watch server response time — TTFB becomes the bottleneck.
Static generation (SSG / ISR)Fully-formed HTML, generated at build or on revalidation.Lowest. Watch staleness — content can lag the database.
Hybrid (server shell, client content)Layout and nav in HTML; the content fetched client-side.Deceptive. It looks server-rendered until you search the source for your product description.

The three views of your page, and which one Google sees

There are three versions of every page, and developers routinely check the wrong one and declare it fine.

  1. View Source — the raw HTML the server sent. What a non-rendering crawler gets, and what Google gets on its first pass.
  2. DevTools → Elements — the live DOM after your JavaScript ran in *your* browser, on *your* machine. It always looks great. It proves nothing.
  3. URL Inspection → Test Live URL → View Tested Page → HTML — the DOM Google's renderer produced. The only authoritative answer, and it's free.

The failures that show up again and again

In practice the same handful of mistakes account for nearly every JavaScript indexing problem we're called in for.

  • Links that aren't links. <div onClick={() => router.push('/product/123')}> renders no href, so Google finds no link and the destination is discovered only via your sitemap, with no anchor text. Next.js's <Link> emits a real anchor; hand-rolled click handlers don't.
  • Metadata set after mount. A title written in a useEffect is absent from the first response and absent for every non-rendering consumer. Emit it server-side.
  • `ssr: false` on something that matters. Right for a map widget, wrong for your product description — it removes the content from the HTML entirely.
  • Content behind an interaction. Tabs and accordions are fine when the content is already in the DOM. When the click triggers a fetch, it doesn't exist for a crawler at all.

Hydration and content parity

Hydration is React attaching its handlers to server-rendered HTML, and it works fine until server and client disagree about what the page says. Personalisation, geo-detection, A/B tests and time-based content all produce a server response and a client render that differ — and Google indexes what its renderer produced, once, from whichever variant it happened to receive.

The rule is boring and it holds: primary content, headings, canonical, metadata and internal links must be identical in the server HTML and after hydration. Vary the banner and the currency toggle. Don't vary the thing you're trying to rank.

One last check, five minutes, no tools: load a key page with JavaScript disabled. Headline, body copy and navigation still there means you don't have a JavaScript SEO problem. A blank page means you do — worth an audit before you spend more on content.

Related questions.

Does Google index JavaScript content?

Yes, via a second rendering pass using a headless Chromium. The content gets indexed — later, and only if the render succeeds. The risks are the delay, links not discovered on the first pass, and crawlers other than Google that never render at all.

Is server-side rendering necessary for SEO?

Not strictly necessary for Google, increasingly worth it for everything else. SSR removes the render queue from your critical path, gets content to non-rendering AI crawlers, and usually improves LCP. Client-side rendering works; it just works less reliably, for less of the web.

How do I check what Google sees on my page?

Search Console → URL Inspection → Test Live URL → View Tested Page → HTML tab. That's the DOM Google's renderer produced. Compare it against View Source to see exactly what JavaScript added, and check the More Info tab for blocked resources.

Are React and Next.js bad for SEO?

No. Next.js with server components or SSR ships complete HTML and looks identical to Googlebot to any other server-rendered stack. A bare create-react-app SPA is a different matter. The framework isn't the variable — what's in the first response is.

Why are my pages indexed but showing the wrong title?

Usually because the title is set client-side and Google indexed the pre-render version, or because the rendered title differs from the server one. Check both in URL Inspection. Set titles server-side and the problem disappears.

Do AI crawlers execute JavaScript?

Mostly not. GPTBot, ClaudeBot, PerplexityBot and similar generally take the raw HTML response. If your content only exists after hydration, you're invisible to that entire class of traffic — which is a newer and stronger argument for server rendering than Google ever was.

Last slot's open

Make this the last growth call you book.

Grab the free strategy call and walk away with a 90-day growth plan — hired or not. Or just text us. Either way, you'll know exactly how we'd win.

Guaranteed or it's free · No lock-in · Free strategy call