Quick answer: Googlebot can run JavaScript, but it does so in a second step — after the initial crawl. That means content loaded by JavaScript may be discovered days or weeks after the page itself is crawled, in a process often called two-wave indexing. JavaScript SEO is the practice of making sure Google can see, render and index your JavaScript content: keep critical content in server-rendered HTML where possible, make sure Googlebot can fetch your JavaScript files, test with the URL Inspection tool, and watch Core Web Vitals, because heavy JavaScript is one of the most common causes of slow pages. If your site is built on a JavaScript framework, this is not optional — it decides whether your content exists in search at all.
Most modern websites use JavaScript. Frameworks like React, Vue, Angular and Next.js power a large share of the web, and even ordinary WordPress sites load JavaScript for menus, sliders, forms and analytics. For users, that is fine — browsers run JavaScript instantly. For search engines, it is a complication: Googlebot has to download your JavaScript, run it, wait for the page to build itself, and only then read the content. This guide explains how that process works in 2026, what goes wrong, and how to fix it.
How Google handles JavaScript pages
Googlebot processes a JavaScript page in stages, and understanding the stages explains most JavaScript SEO problems.
Stage 1: Crawling the HTML
Googlebot first fetches the page’s HTML, exactly as your server sends it. On a server-rendered site, that HTML already contains the content. On a client-side rendered site, the HTML is mostly an empty shell — a <div id="app"> and a bundle of JavaScript files. At this stage, Google sees almost nothing of your actual content.
Stage 2: Rendering (the second wave)
Later — hours, days or sometimes weeks after the first crawl — Googlebot puts the page in a rendering queue, downloads the JavaScript and CSS, runs them, and reads the page that results. This is the second wave of indexing. Only after rendering does Google know what the page actually says, which links it contains, and which images it loads.
The gap between the two waves is the central problem of JavaScript SEO. During that gap, your page may be indexed with no content, or not indexed at all. Links that only exist after rendering are not discovered until the second wave, so pages they point to wait even longer. And if rendering fails — a script error, a blocked file, a timeout — Google may never see the content.
Stage 3: Indexing
Once rendering succeeds, Google indexes the rendered page like any other: content, links, images, structured data. But anything the renderer could not produce is missing from the index, and Google does not retry rendering forever.
Why JavaScript SEO matters more in 2026
Three trends make this more important now than it was a few years ago:
- Mobile-first indexing is complete. Google now indexes the mobile version of your site, and mobile devices have less processing power — a page that renders slowly on a phone is one Google may render partially or not at all. See our Mobile-First Indexing in 2026 guide.
- AI search engines read your pages too. ChatGPT, Perplexity and Google AI Overviews cite pages they can read. AI crawlers are generally worse at JavaScript than Googlebot, so a page that depends on JavaScript for its content is less likely to be cited.
- Core Web Vitals punish heavy JavaScript. JavaScript is the most common cause of slow Interaction to Next Paint (INP) and slow Largest Contentful Paint (LCP). The thresholds are LCP 2.5 seconds or less, INP 200 milliseconds or less, and CLS 0.1 or less — and heavy JavaScript is the usual reason pages fail them. See our Core Web Vitals 2026 guide.
The November 2026 core update reinforced the same point: Google rewards pages that genuinely answer the query, and it can only reward content it can actually read.
The most common JavaScript SEO problems
1. Critical content only exists after rendering
If your main text, product prices, headings or internal links are injected by JavaScript, Google may index the page before it sees them — or never see them at all. This is the single most damaging JavaScript SEO problem, and it is common on single-page applications and on sites that load content through API calls.
2. JavaScript files blocked from Googlebot
If your robots.txt blocks .js files, or your CDN or firewall blocks Googlebot from fetching scripts, rendering fails. Google has said clearly for years: do not block JavaScript and CSS. Check that Googlebot can fetch every script your page needs. Our guide on controlling AI crawlers with robots.txt shows how to check what crawlers can reach.
3. JavaScript errors that break rendering
One broken script can stop the whole page from rendering. A third-party widget that fails, a script that depends on a browser feature Googlebot does not support, or an error in your own code — any of these can leave Googlebot with a blank page. Test rendering regularly, because a code change that works in your browser can still break in Google’s renderer.
4. Content behind user interaction
Content that only appears after a click, a scroll or a form submission is invisible to Googlebot, which does not click around your site. Tabs, accordions and “load more” buttons are the usual suspects. If the content matters for search, it should be in the initial HTML or loaded without interaction.
5. Slow rendering and timeouts
Googlebot gives rendering a limited amount of time. A page that takes several seconds to render — huge JavaScript bundles, slow API calls, dozens of third-party scripts — may be rendered partially or abandoned. Speed up rendering by cutting bundle size, deferring non-critical scripts, and making your server respond fast. See our guide on reducing server response time (TTFB).
How to check what Google actually sees
Never guess. Use Google’s own tools to see the rendered page:
- URL Inspection tool in Search Console. Enter a URL, click “Test live URL”, then “View tested page” → “Screenshot” and “More info”. The screenshot shows what Googlebot’s renderer produced. If the content is missing from the screenshot, Google cannot see it either.
- Compare the HTML and the rendered HTML. The URL Inspection tool shows both. The HTML is what your server sent; the rendered HTML is what Googlebot produced after running JavaScript. Content in the rendered HTML but not in the raw HTML is content that depends on the second wave.
- Check the “Discovered – currently not indexed” report. JavaScript-heavy pages often sit in this report for weeks while they wait for rendering. See our guide on fixing ‘Discovered – Currently Not Indexed’ for the full diagnosis.
- Use the Mobile-Friendly Test or Rich Results Test. Both render the page and show you what Google sees, including any structured data that only appears after rendering.
- Disable JavaScript in your own browser. Turn JavaScript off and load the page. What you see is close to what Google sees in the first wave. If the page is blank, your content depends entirely on JavaScript — and that is a risk.
Fix 1: Server-side rendering (SSR) for critical content
The most reliable fix for JavaScript SEO is to render the important content on the server, so it arrives in the initial HTML. This is called server-side rendering (SSR).
- SSR means the server builds the full HTML — content, links, images, meta tags — before sending the page. Googlebot sees everything in the first wave, and users see content faster too.
- Static site generation (SSG) is the same idea taken further: pages are built once at deploy time and served as plain HTML. For content sites, blogs and marketing pages, SSG is the fastest and most reliable option.
- Hybrid rendering keeps SSR for the important pages (homepage, product pages, blog posts) and client-side rendering for interactive parts (dashboards, account pages) that do not need to rank.
If you are choosing a framework, prefer one with SSR built in — Next.js, Nuxt and similar frameworks are designed for this. If your site is already client-side rendered, moving to SSR is a real project, but it is the fix that solves the problem at its root rather than working around it.
Fix 2: Pre-rendering for pages that cannot use SSR
If full SSR is not practical, pre-rendering is a simpler alternative: a service renders your pages in advance and serves the finished HTML to crawlers, while real users get the normal JavaScript version.
- When it works well: content sites with a moderate number of pages, where the content does not change every minute.
- When to be careful: pre-rendered HTML must match what users see. If the crawler version and the user version differ, Google treats that as cloaking — a serious violation. Keep both versions identical in content.
- Keep it fresh: re-render pages when their content changes, or the crawler will keep seeing stale content.
Pre-rendering is a bridge, not a destination. It fixes the symptom (Google cannot see the content) without fixing the cause (the content is not in the HTML). Use it while you plan a proper SSR move.
Fix 3: Dynamic rendering — use it only as a last resort
Dynamic rendering means detecting crawlers and serving them a server-rendered version of the page, while users get the JavaScript version. Google has said it supports this approach, but it is the weakest option:
- It adds complexity. You are maintaining two versions of every page, and they can drift apart.
- It only helps crawlers you detect. AI crawlers, social media crawlers and other bots may not be detected, so they still see the empty shell.
- Google’s guidance has moved on. Google now recommends SSR or pre-rendering over dynamic rendering for most sites.
Use dynamic rendering only if SSR and pre-rendering are genuinely impossible for your setup, and plan to move away from it.
Fix 4: Make your JavaScript lighter and faster
Even with SSR, heavy JavaScript hurts your rankings through Core Web Vitals. The fixes:
- Split your bundles. Load only the JavaScript each page needs. A page that loads the code for every feature on the site is carrying dead weight.
- Defer non-critical scripts. Scripts for analytics, chat widgets and social embeds should load after the main content, not before it.
- Remove unused JavaScript. Audit your scripts regularly. Old plugins, abandoned A/B test code and libraries you no longer use all add weight.
- Avoid JavaScript for things HTML can do. Navigation menus, tabs and simple interactions often do not need JavaScript at all. Native HTML and CSS are faster and always visible to crawlers.
- Check third-party scripts. A single slow third-party script — an ad network, a tracking pixel, a chat widget — can delay rendering of the whole page. Measure each one and remove or defer the slow ones.
Fix 5: Put SEO-critical elements in the HTML
Some things must be in the initial HTML, no exceptions:
- Title tags and meta descriptions. If these are set by JavaScript, Google may index the page with a missing or wrong title.
- Canonical tags. A canonical that only appears after rendering may not be respected, and the wrong URL can get indexed.
- Structured data. Schema markup injected by JavaScript is often missed. Put JSON-LD in the server-rendered HTML.
- Hreflang tags. Language and regional versions need hreflang in the HTML, or Google may not connect them.
- Internal links to important pages. Links that only exist after rendering are discovered late, and the pages they point to wait longer for a crawl.
If you remember one rule, make it this one: anything that affects how Google understands or ranks the page belongs in the HTML, not in JavaScript.
The JavaScript SEO checklist
- [ ] Critical content, headings and links present in the raw HTML (checked with JavaScript disabled)
- [ ] Title, meta description, canonical and structured data in the server-rendered HTML
- [ ] No JavaScript or CSS files blocked in robots.txt or by the firewall/CDN
- [ ] URL Inspection tool screenshot shows the full content — no blank sections
- [ ] Content does not depend on clicks, scrolling or form submissions to appear
- [ ] JavaScript bundles split per page; non-critical scripts deferred
- [ ] Third-party scripts audited — slow ones removed or delayed
- [ ] Rendering time checked — page renders fully within a few seconds
- [ ] Core Web Vitals passing: LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1
- [ ] New JavaScript pages checked in Search Console for indexation delays
- [ ] No JavaScript errors in the rendered page (check the console in URL Inspection)
- [ ] AI crawlers can read the page too — test with the rendered HTML, not just Googlebot
How to decide: SSR, pre-rendering or leave it alone?
Not every site needs to rebuild. Use this guide:
- Content is in the HTML already (WordPress, static sites, most blogs): you probably have no JavaScript SEO problem. Check the URL Inspection tool once to confirm, then move on.
- Some content depends on JavaScript (a few widgets, a search filter): fix the specific elements — put the important content in HTML, defer the rest. No rebuild needed.
- The whole site is client-side rendered (single-page application): this is the case that needs SSR or pre-rendering. The longer you wait, the more indexing delays cost you.
- You are building a new site on a JavaScript framework: choose SSR from the start. It is far cheaper than retrofitting it later.
Run the full technical check with our Technical SEO Audit Checklist 2026 to see where JavaScript fits in your site’s overall health.
FAQ
Can Googlebot run JavaScript?
Yes. Googlebot runs JavaScript using a modern headless browser, and it can render most JavaScript pages. The problem is timing: rendering happens in a second step, after the initial crawl, so JavaScript content is discovered and indexed later than HTML content — sometimes days or weeks later.
What is two-wave indexing?
Two-wave indexing describes how Google processes JavaScript pages in two steps: first it crawls the raw HTML, then later it renders the page by running the JavaScript. Content that only appears after rendering is indexed in the second wave. That delay is why JavaScript-heavy pages can take much longer to appear in search results.
Is server-side rendering (SSR) better than client-side rendering for SEO?
Yes, for pages that need to rank. With SSR, the content is in the initial HTML, so Googlebot sees it in the first wave — no rendering delay, no risk of a failed render. Client-side rendering works for interactive pages that do not need to rank, but it is a poor choice for content, product and landing pages.
Should I use dynamic rendering?
Only as a last resort. Google supports it, but it adds complexity, only helps the crawlers you detect, and requires you to keep two versions of every page identical. SSR or pre-rendering are better options for almost every site.
How do I check if Google can see my JavaScript content?
Use the URL Inspection tool in Search Console: test a live URL and look at the screenshot and the rendered HTML. If the content is missing from the screenshot, Google cannot see it. You can also disable JavaScript in your own browser and load the page — what you see is close to what Google sees before rendering.
Leave a Reply