---
title: "JavaScript crawling"
description: "How search and AI bots fetch and render JavaScript pages, why many AI crawlers miss script-built content, and how to fix it."
url: https://ursy.com/wiki/javascript-crawling/
updated: 2026-11-25T00:49:39+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/javascript-crawling/
---

# JavaScript crawling

> How search and AI bots fetch and render JavaScript pages, why many AI crawlers miss script-built content, and how to fix it.

**JavaScript crawling is how a [search engine](https://ursy.com/wiki/search-engine/) or AI [bot](https://ursy.com/wiki/bot-web-robot/) fetches a page whose content is built or changed by JavaScript, runs (renders) that code, and reads the result.** [Google](https://ursy.com/wiki/google/) renders JavaScript before it indexes a page. Many [AI crawlers](https://ursy.com/wiki/ai-crawler/) were found in a December 2024 study not to render it at all, so words that only appear after scripts run can be invisible to them.

## What is JavaScript crawling? {#what-is-javascript-crawling}

A plain [HTML](https://ursy.com/wiki/html/) page holds its words in the file the server sends. A JavaScript-heavy page often sends a near-empty shell plus scripts, and the browser builds the content. For a bot, that means 2 jobs instead of 1: fetch the file, then run the code to see what a person would see. That second job is called [rendering](https://ursy.com/wiki/rendering/). It costs time and computing power, so not every bot does it.

Google’s [JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics) describes 3 phases: crawling, rendering and indexing. Pages that return a 200 status go into a render queue. The renderer is a headless, evergreen version of Chromium, the engine behind Chrome. Only after rendering does Google read the final HTML for the index.

## Why does it matter for search? {#why-does-it-matter-for-search}

If your words, links or [product data](https://ursy.com/wiki/product-structured-data/) only exist after scripts run, Google sees them later than plain HTML and only if rendering succeeds. Some limits are hard:

- **Blocked files are not rendered.**  Google says it will not render JavaScript from files or pages blocked in [robots.txt](https://ursy.com/wiki/robots-txt/).
- **Links must be real links.**  Google can only follow `<a>` elements with an `href`. Its [crawlable links guide](https://developers.google.com/search/docs/crawling-indexing/links-crawlable) lists a `span` with an href, an `a` with only an onclick, and a `javascript:` href as not recommended.
- **Hash addresses are risky.**  Do not use the `#` part of a [URL](https://ursy.com/wiki/url/) to load different content. Google suggests the History API for routing.
- **A late noindex is unreliable.**  Google warns that a [noindex](https://ursy.com/wiki/noindex/) in the first HTML can make it skip the render step, so removing that tag later with a script is unreliable.

## Why does it matter for AI answers? {#why-does-it-matter-for-ai-answers}

This is where the gap is widest. In [The rise of the AI crawler](https://vercel.com/blog/the-rise-of-the-ai-crawler) (17 December 2024), Vercel and MERJ reported that none of the major AI crawlers they tested rendered JavaScript. They named [GPTBot](https://ursy.com/bots/gptbot/), [ClaudeBot](https://ursy.com/bots/claudebot/) and [PerplexityBot](https://ursy.com/bots/perplexitybot/). These bots fetched script files but could not read content drawn by them. The same study found that Gemini uses [Googlebot](https://ursy.com/bots/googlebot/)‘s setup and renders fully, and that [Applebot](https://ursy.com/bots/applebot/) renders too. That is one study at one date, so test your own pages rather than assume.

The lesson for [answer engine optimisation](https://ursy.com/wiki/answer-engine-optimisation/) is simple. If you want a [large language model](https://ursy.com/wiki/large-language-model/) to quote your price, opening hours or product facts, put them in the HTML the server sends. Our page on [technical SEO for AI search](https://ursy.com/wiki/technical-seo-for-ai-search/) goes further.

## How does rendering work on a site? {#how-does-rendering-work-on-a-site}

The main choices are set out in [Rendering on the Web](https://web.dev/articles/rendering-on-the-web) from web.dev:

| Method | Where the HTML is built | What a non-rendering bot sees |
| --- | --- | --- |
| [Server-side rendering](https://ursy.com/wiki/server-side-rendering/) | On the server, for each request | The full content |
| Static rendering | Ahead of time, one file per address | The full content |
| [Client-side rendering](https://ursy.com/wiki/client-side-rendering/) | In the browser, by JavaScript | Often an empty shell |
| Hydration | Server HTML first, then scripts add interaction | The full content |

web.dev adds a caution for client-side rendering: script size tends to swell as features are added, and a heavy bundle can drag down [Interaction to Next Paint](https://ursy.com/wiki/interaction-to-next-paint/). Our comparison of [client-side vs server-side rendering](https://ursy.com/wiki/client-side-vs-server-side-rendering/) covers the trade-offs.

## Is dynamic rendering still a fix? {#is-dynamic-rendering-still-a-fix}

[Dynamic rendering](https://ursy.com/wiki/dynamic-rendering/) means sending bots a pre-rendered page and people the script version. Google’s page on [dynamic rendering](https://developers.google.com/search/docs/crawling-indexing/javascript/dynamic-rendering) now calls it a workaround and not a recommended solution, because it adds complexity and cost. Its advice is to build the HTML on the server, at build time, or with hydration. Be careful too: showing bots different content from people with intent to mislead is [cloaking](https://ursy.com/wiki/cloaking/).

## What are the common mistakes? {#what-are-the-common-mistakes}

- A [single-page application](https://ursy.com/wiki/single-page-application/) that returns 200 for every address, so missing pages become [soft 404s](https://ursy.com/wiki/soft-404/). Google suggests a script [redirect](https://ursy.com/wiki/redirect/) to a real 404 address or a noindex on error views.
- A [canonical tag](https://ursy.com/wiki/canonical-tag/) set by script that differs from the one in the HTML. Google says to use only 1 and keep them the same.
- Old cached scripts. Google says its renderer caches hard and may ignore cache headers. File names with a content hash avoid stale code.
- Content behind clicks or scrolls with no real address. Follow the guidance on [lazy loading](https://ursy.com/wiki/lazy-loading/).
- Blocking `/js/` or `/assets/` folders in robots.txt.

## A worked example {#a-worked-example}

A small shop moves to a new theme. Each product page now loads its price, stock and description from a script after the page opens. In a normal browser it looks fine. View the raw source and the description box is empty. Google renders the page, so the product still gets indexed, a little slower. But when a person asks an [AI assistant](https://ursy.com/wiki/ai-assistant/) about that product, the AI bot fetched only the shell. It has no description and no price to quote. The fix: print the core facts in the server HTML, then let scripts add the extras like reviews or a size picker. Nothing about the look changes.

## How do I check it? {#how-do-i-check-it}

1. Run a page through our free [JavaScript SEO checker](https://ursy.com/javascript-seo-checker/), which shows what bots that do not run JavaScript miss.
2. Check your rules do not block script or style files with the [robots.txt checker](https://ursy.com/robots-txt-checker/).
3. See which AI bots can reach the page with the [AI bot checker](https://ursy.com/ai-bot-checker/).
4. In [Google Search Console](https://ursy.com/wiki/google-search-console/), use [URL Inspection](https://ursy.com/wiki/url-inspection/) and view the rendered HTML.
5. For many pages at once, our [JavaScript rendering check](https://ursy.com/pro/javascript-rendering-check/) (Pro) is being built.

## Questions {#questions}

### Does Google index JavaScript content? {#does-google-index-javascript-content}

Yes, after it renders the page. Google still recommends server-side or pre-rendering because not all bots run JavaScript.

### Can I add structured data with JavaScript? {#can-i-add-structured-data-with-javascript}

Google says you can inject [JSON-LD](https://ursy.com/wiki/json-ld/) with JavaScript, but test it. Check the result with our [schema checker](https://ursy.com/schema-checker/).

### Can JavaScript set my title and meta description? {#can-javascript-set-my-title-and-meta-description}

Yes. Google says JavaScript can set or change the [title](https://ursy.com/wiki/title-tag/) and [meta description](https://ursy.com/wiki/meta-description/). Non-rendering bots will still read the original ones.

## Related words {#related-words}

- [JavaScript SEO](https://ursy.com/wiki/javascript-seo/)
- [Rendering](https://ursy.com/wiki/rendering/)
- [DOM (Document Object Model)](https://ursy.com/wiki/dom-document-object-model/)
- [AI crawlability](https://ursy.com/wiki/ai-crawlability/)
- [Crawling](https://ursy.com/wiki/crawling/)

## Sources {#sources}

- [Google Search Central: Understand the JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics), checked 25 November 2026
- [Google Search Central: Make your links crawlable](https://developers.google.com/search/docs/crawling-indexing/links-crawlable), checked 25 November 2026
- [Google Search Central: Dynamic rendering as a workaround](https://developers.google.com/search/docs/crawling-indexing/javascript/dynamic-rendering), checked 25 November 2026
- [web.dev: Rendering on the Web](https://web.dev/articles/rendering-on-the-web), checked 25 November 2026
- [Vercel and MERJ: The rise of the AI crawler (17 December 2024)](https://vercel.com/blog/the-rise-of-the-ai-crawler), checked 25 November 2026

*Updated 25 November 2026 by URSY.*
