
Yes, Google can crawl JavaScript sites and run the JavaScript on them. That does not mean everything your scripts do will reach the index. Rendering is a separate step with its own limits, and a page can look perfect in your browser while Google sees something quite different.
Quick Answer
Yes. Google crawls a page, queues it for rendering, runs its JavaScript in a headless browser and indexes the rendered HTML. Problems start when scripts are blocked, links are not real links, content needs a user action to appear, or errors return HTTP 200. Google still recommends server-side rendering or pre-rendering, and most AI crawlers do not run JavaScript at all. To see what Google sees, use the URL Inspection tool in Search Console.
Everything below about Google’s behaviour comes from its JavaScript SEO documentation and related Search Central pages, checked on November 7, 2026.
How Google Processes JavaScript: Three Phases
| Phase | What happens | What can go wrong |
|---|---|---|
| 1. Crawling | Googlebot requests the URL and checks that robots.txt allows it. It reads the HTML and picks up links. | Blocked URLs or files, links that are not real links, or responses that are too large. |
| 2. Rendering | Pages that return HTTP 200 go into a queue. A headless Chromium browser then runs the JavaScript. | Blocked scripts, errors, unsupported features, or content that depends on user actions. |
| 3. Indexing | Google uses the rendered HTML to index the content and find further links. | Missing content, wrong canonical, or a noindex tag. |
Google says a page may stay in the rendering queue for a few seconds, but that it can take longer. So do not assume JavaScript content is indexed right after the first crawl.
What Commonly Breaks JavaScript SEO
Blocked scripts
Google will not render JavaScript from blocked files or on blocked pages. If robots.txt blocks the script that builds your page, Google may receive a nearly empty document.
Links that are not links
Google follows <a> elements with an href. Navigation built only on click handlers can leave whole sections undiscovered. Single-page apps should use the History API, because Google does not reliably treat URL fragments as separate pages.
Soft 404s in single-page apps
Client-side apps often show a “not found” message on a page that still returns HTTP 200, and those error pages can end up indexed. Google suggests redirecting to a URL that returns a real 404, or adding a noindex tag with JavaScript.
Using JavaScript to remove noindex
This one catches people out. When Google sees noindex in the original HTML, it may skip rendering altogether, so a script that removes the tag may never run. If the page should be indexed, leave the tag out of the initial HTML.
Content that needs a user action or stored data
Rendering does not behave like a returning visitor. Local storage, session storage and cookies are cleared across page loads, so content that depends on them may never appear. Only content in the rendered DOM can be indexed, and Google also warns about features such as WebSockets and WebRTC, which are not supported.
Oversized files
Google’s Googlebot documentation says it crawls the first 2MB of a supported file, uncompressed, with each referenced CSS and JavaScript file fetched separately under the same limit. Content beyond the cutoff is not used for indexing.
Stale cached files
Google’s renderer may ignore caching headers and use outdated scripts or CSS. Fingerprinted file names, such as main.2bb85551.js, make sure it gets the new version.
Not sure what Google sees on your site?
Ask for an SEO & GEO Audit →How to Test What Google Sees
- Open URL Inspection in Search Console and enter the URL.
- Run Test Live URL, then choose View Tested Page.
- Look at the rendered HTML and search for the text, links and tags that matter.
- Check the loaded resources and console output for blocked files and JavaScript errors.
- For a page on a site you do not manage, use the Rich Results Test, which also shows rendered HTML.
Then check the index itself: URL Inspection tells you whether the page is indexed and how Google last crawled it. A live test only shows that Google can see the content now.
Which Rendering Approach Should You Use?
| Approach | What Google gets | Good choice for |
|---|---|---|
| Static or pre-rendering | Complete HTML straight away | Blogs, documentation, marketing pages |
| Server-side rendering | Complete HTML straight away | Pages that change often, stores, large content sites |
| Client-side rendering | A shell, with content after rendering | Logged-in apps and pages that do not need search traffic |
| Dynamic rendering | A separate version for bots | Avoid for new work: Google calls it a workaround |
Google recommends server-side or pre-rendering because it makes a site faster for users and crawlers, and because not all bots can run JavaScript.
JavaScript and AI Crawlers Are a Different Story
Passing Google’s rendering does not mean your content reaches AI assistants. In our breakdown of whether AI crawlers render JavaScript, GPTBot, ClaudeBot and PerplexityBot only read the raw HTML. If your main content appears only after JavaScript runs, those crawlers are likely to miss it, which is one more reason to serve important content in the initial HTML.
A Short Checklist for JavaScript Pages
- Key text and links are visible in the rendered HTML in URL Inspection.
- robots.txt does not block scripts needed to build the page.
- Internal links are
<a href>elements, with no routing through URL fragments. - Missing pages return a real 404 or carry a
noindex. - Pages you want indexed have no
noindexin the initial HTML. - Titles, descriptions and canonicals are correct after rendering, and the canonical matches the one in the original HTML.
- Main content does not depend on clicks, scrolling, cookies or local storage.
- Script and CSS files use fingerprinted names.
For the rest of the checks, see our technical SEO checklist. If a page still is not indexed once rendering looks right, our Google indexing tools comparison explains your options.
Related reading: what Crawled – currently not indexed means.
Related reading: which CMS platforms serve SEO-friendly HTML out of the box, including headless options.
Frequently Asked Questions
Can Google crawl JavaScript websites?
Yes. Google crawls the page, queues it for rendering, runs the JavaScript in a headless browser and indexes the rendered HTML. Content that never appears in the rendered HTML cannot be indexed.
How long does Google take to render JavaScript?
Google says a page may stay in the rendering queue for a few seconds, but that it can take longer. It does not give a fixed time.
Does JavaScript hurt SEO?
Not by itself. It causes problems when it hides content or links from Google, returns errors on HTTP 200 or slows pages down. Server-side or pre-rendering avoids many of these risks.
Can Google index content loaded on click?
Do not rely on it. Google indexes what is in the rendered DOM, so content that appears only after a click or another user action may not be seen. Put important content in the page by default.
Do I need server-side rendering for Google?
It is not required, because Google can render client-side pages. Google still recommends server-side or pre-rendering, as it is faster and works for bots that cannot run JavaScript.
Do AI crawlers run JavaScript?
Our research found that GPTBot, ClaudeBot and PerplexityBot read raw HTML and do not run JavaScript, so client-rendered content is likely to be invisible to them.



