Skip to content

Toufiq SEO

Technical SEO

JavaScript SEO: How Google Renders JavaScript and What Goes Wrong

How Googlebot handles JavaScript, why some JS sites lose content in search, and practical fixes for developers and site owners.

  • Published
  • 4 min read
Colorful JavaScript code on a monitor
On this page
  1. How Google processes JavaScript
  2. Rendering approaches compared
  3. Common JavaScript SEO problems
  4. How to test a JavaScript page
  5. Practical checklist
  6. Frequently asked questions

Quick answer: Google can render JavaScript, but it does so in a separate step after crawling, and problems in that process can hide content, links or metadata from search. To keep a JavaScript site search-friendly, serve important content and links in the initial HTML through server-side rendering or static generation where possible, use real anchor links with href attributes, give each view its own URL, avoid blocking script files in robots.txt and test pages with Search Console’s URL Inspection tool.

Modern sites built with React, Vue, Angular and similar frameworks can rank perfectly well. They can also quietly lose content in search because something only appears after a click, a scroll or a script that Googlebot never runs. JavaScript SEO is about removing that uncertainty.

How Google processes JavaScript

Google’s JavaScript SEO basics describes three phases:

  1. Crawling: Googlebot fetches the URL and reads the initial HTML.
  2. Rendering: a headless, up-to-date Chromium renders the page and runs JavaScript.
  3. Indexing: Google uses the rendered HTML to index content and discover links.

Rendering may happen shortly after crawling, but it is a separate step, and anything that fails during it is invisible to Google. Other crawlers, including some AI and social media crawlers, may not render JavaScript at all.

Rendering approaches compared

ApproachHow it worksSEO risk
Client-side rendering (CSR)Browser builds the page from JavaScriptHighest: content depends on rendering
Server-side rendering (SSR)Server sends complete HTML, then JavaScript adds interactivityLow
Static site generation (SSG)Pages built as HTML in advanceLow
HybridSSR or SSG for key pages, CSR for app areasLow if key pages are rendered

Google describes dynamic rendering, serving bots a different pre-rendered version, as a workaround rather than a recommended long-term solution.

Common JavaScript SEO problems

Links that are not links

Google follows <a href="/page"> links. It does not reliably follow elements that navigate with onclick handlers and no href. Google’s documentation on crawlable links is explicit about this. Navigation built from buttons or divs can leave whole sections undiscovered.

Content behind interactions

Text loaded only after a click, a tab change or infinite scroll may never be rendered. Googlebot does not click or scroll like a user. Put important content in the HTML and use CSS to show and hide it if needed.

Hash-based URLs

URLs like /#/services are treated as the same page. Use the History API so each view has its own clean URL.

Metadata set by JavaScript

Titles, descriptions, canonicals and robots tags injected by JavaScript can work, but conflicts between the initial HTML and the rendered version cause problems. If the initial HTML has noindex, Google may not render the page to see a JavaScript change.

Blocked resources

If robots.txt blocks script or API files the page needs, Google cannot render it properly. The robots.txt guide covers the specifics.

Soft 404s in single-page apps

An app that shows “page not found” but returns HTTP 200 creates soft 404 errors. Return a real 404 status, or redirect to a URL that does.

Slow rendering and Core Web Vitals

Heavy bundles delay content and interaction. Large JavaScript is a frequent cause of poor INP scores.

How to test a JavaScript page

  1. URL Inspection in Search Console: run a live test and view the rendered HTML and screenshot. Check that key content and links are present.
  2. View source versus inspect element: compare the raw HTML with the rendered DOM to see what depends on JavaScript.
  3. Disable JavaScript in your browser and load the page. What remains is what non-rendering crawlers see.
  4. Crawl with rendering enabled in a tool like Screaming Frog and compare with a non-rendered crawl.
  5. Search for a unique sentence from the page in Google to confirm it was indexed.

Practical checklist

  • Key content and internal links present in initial HTML.
  • Every route has a unique URL and returns the right status code.
  • Titles, canonicals and meta robots consistent in raw and rendered HTML.
  • No essential resources blocked.
  • Structured data present in the rendered output.
  • Images use standard img elements with src.

JavaScript problems are among the hardest to spot without testing, and they are a regular part of technical SEO for SaaS, e-commerce and custom-built sites.

Frequently asked questions

Can Google index JavaScript content?

Yes, Google renders JavaScript with a modern Chromium. Problems come from content that fails to render or needs interaction.

Is React bad for SEO?

No. Client-side-only React adds risk. Frameworks with server rendering or static generation avoid most issues.

Do AI crawlers render JavaScript?

Many do not. Server-rendered content is safest if AI search visibility matters.

Should I use dynamic rendering?

Google treats it as a workaround. Server-side rendering or static generation is a better long-term choice.

Sources: Google Search Central: Understand JavaScript SEO basics; Google Search Central: Link best practices for Google.

Toufiq-ur Rahman Kobir
Written by

Independent SEO consultant

Google, Maps and AI search

Toufiq-ur Rahman Kobir is an independent SEO consultant who helps US businesses get found on Google Search, Google Maps and in AI answers. He has led SEO as SEO Manager at a US agency, managing more than twenty webmasters, content managers and copywriters, and now works directly with a small number of clients on technical SEO, local SEO, content strategy and AI search visibility.

Works with
US businesses, remotely
Background
SEO Manager at a US agency
Focus
Technical SEO, content strategy, AI search
Status
Taking on a limited number of clients
Scroll to Top