AI Crawlers

JavaScript SEO: can Google and AI crawlers read your site?

By Nihanth Guntur · 2026-11-25

JavaScript SEO is the work of making sure content your site builds with JavaScript can still be crawled, rendered and indexed. Google can render JavaScript, but it does so in a separate, later step, and its own documentation says not all bots can run JavaScript. The safe default for Google and AI crawlers alike is to put your important content in the server-rendered HTML.

What is JavaScript SEO?

JavaScript SEO is about one question: is the content you want found present in what a crawler actually receives and processes? On a classic server-rendered site the answer is simple, because the HTML response already holds the text. On a site that builds its pages in the browser, the answer depends on whether, and when, the crawler runs your scripts.

Google frames this clearly in its JavaScript SEO basics documentation: "Crawling a URL and parsing the HTML response works well for classical websites or server-side rendered pages where the HTML in the HTTP response contains all content." The difficulty begins with what Google calls the app shell model, where "the initial HTML does not contain the actual content and Google needs to execute JavaScript before being able to see the actual page content that JavaScript generates."

That is the whole problem in one sentence. If the first HTML response is an empty shell, every system that reads your site has to do extra work to see anything, and you are relying on each of them to do it.

How does Google crawl and render JavaScript pages?

Google processes JavaScript pages in stages: it crawls the URL, queues the page for rendering, renders it in a headless browser when resources allow, and then indexes the rendered result. Content only counts once it appears in that rendered HTML.

Here is the pipeline as Google's documentation describes it:

  1. Crawl permission check. "When Googlebot fetches a URL from the crawling queue by making an HTTP request, it first checks if you allow crawling." A page or script blocked in robots.txt stops here: "Google Search won't render JavaScript from blocked files or on blocked pages."
  2. Queueing. "Googlebot queues pages for both crawling and rendering." Pages returning a 200 status go into the render queue "unless a robots meta tag or header tells Google not to index the page."
  3. Rendering. "Once Google's resources allow, a headless Chromium renders the page and executes the JavaScript." Note the condition: rendering happens when resources allow, not at the moment of the crawl.
  4. Indexing. "Google also uses the rendered HTML to index the page." And the hard rule: "If the content isn't visible in the rendered HTML, Google won't be able to index it."

Two practical consequences follow. First, anything that blocks your JavaScript files, whether a robots.txt rule or a firewall, can leave Google with the empty shell. Second, the rendering step is a dependency you do not control. Server-rendered content skips that dependency entirely, because it is already in the response Google parsed in the crawl step.

Can AI crawlers read JavaScript-rendered content?

We do not know for every AI crawler, and we will not guess. The sources we rely on for this article do not say which AI crawlers execute JavaScript and which do not, so the honest position is to avoid depending on it.

What Google does say is enough to set a policy. Its JavaScript SEO page states that "server-side or pre-rendering is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript." The web.dev guide to rendering on the web makes the same point from the engineering side: "Crawlers can understand JavaScript, but there are often limitations to how they render," and "Server-side rendering is a popular choice for delivering a 'complete looking' experience that crawlers can interpret."

So the decision rule we use with clients is simple. If a piece of content matters for search or for being cited by an answer engine, it goes in the HTML the server sends. Whether a given AI crawler renders JavaScript then stops being a question you need answered.

Google's own AI features are a separate case, and a reassuring one. Its guide to optimising for generative AI features says these features "are rooted in our core Search ranking and quality systems" and that "a page must be indexed and eligible to be shown in Google Search with a snippet" to appear in them. In other words, for AI Overviews and AI Mode, JavaScript SEO for Google is the same job as ordinary indexing: if Google cannot index the rendered content, its AI features cannot use it either.

Server side rendering SEO: which rendering approach is safest?

Static rendering and server-side rendering are the safest choices for crawlability, because the content is in the first HTML response. Client-side rendering can work for Google but leaves every crawler dependent on running your JavaScript.

The definitions below come from web.dev's rendering guide; the crawlability column is our reading of what each means for search and AI crawlers.

ApproachWhat it meansContent in first HTML?Our view for crawlability
Static rendering"Producing a separate HTML file for each URL ahead of time"YesSafest. Nothing to execute before the text is readable.
Server-side rendering"Generates the full HTML for a page on the server in response to navigation"YesSafe. Also "generally produces a fast FCP", per web.dev.
Client-side rendering"Rendering pages directly in the browser with JavaScript"No, or partlyRiskiest. Depends on each crawler rendering it. web.dev notes it "often needs additional testing and overhead."
Hybrid (server-rendered page, scripts added on top)Core content from the server; interactive parts in the browserCore content, yesSafe, provided the parts you want indexed are the server-rendered ones.

web.dev's advice is worth taking at face value: "Consider whether static rendering or server-side rendering can get you most of the way there." In our experience, for a marketing site, a blog or a service catalogue, the answer is yes. Interactive tools, calculators and dashboards can stay client-side; the pages that need to rank and be quoted should not.

How do you test JavaScript SEO and crawlability on your own site?

Compare what the server sends with what a browser shows. If your key text, headings, links and structured data are missing from the raw HTML response, you have a crawlability dependency on JavaScript.

The checklist we run on a new site:

  • View the raw source, not the inspector. Use your browser's view-source, or fetch the URL from the command line. The developer tools inspector shows the DOM after scripts ran, which hides the problem.
  • Search the raw HTML for your H1 and first paragraph. If they are not there, crawlers that do not render will not see them.
  • Check internal links are real anchor tags with href values in the raw HTML, not click handlers added later.
  • Check structured data is in the response. JSON-LD injected by a tag manager after load is a rendering dependency too.
  • Check that robots.txt does not block your script and style files. Google will not render JavaScript from blocked files.
  • Compare the raw response with the rendered page in a browser, section by section, and list anything that appears only after scripts run.
  • Send requests with crawler user agents and confirm you get a 200, not a 403, 429 or a challenge page.

For that last point, the free AI visibility checker reads your robots.txt rules for 11 AI crawlers and requests your homepage once with each crawler's user agent. That is the checker's own request, not the real crawler's, and it covers the homepage only, so treat it as a first signal rather than proof that a crawler can reach every page. For the wider checks, our technical SEO checklist covers rendering alongside the rest of the site.

What we have seen

Rendering problems sit on top of access problems, and access is where we find the bigger surprises. On one SEO Autopilot engagement, a US healthcare analytics company on WordPress behind a firewall, the firewall returned 403 to OpenAI's and Anthropic's search crawlers on every page. The trigger was a generic bad-bot rule matching the substring "searchbot". Eleven other crawlers passed. The client's monitoring tool reported all sixteen AI crawlers as accessible, because it read robots rules instead of sending requests. No rendering strategy helps a crawler that receives a 403.

The same site showed how templates, not individual pages, decide what crawlers see. 21 of 39 pages had no H1 because the post template rendered the title as an H2. One template change took pages with exactly one H1 from 9 of 39 to 30. Rendering works the same way: if your template builds the main content in the browser, every page built from it inherits the dependency, and one change to server-side output fixes them all. Our guide to indexability versus crawlability goes further into separating the two problems.

Does JavaScript SEO need llms.txt or special AI markup?

Not for Google. Its generative AI guide says "You don't need to create new machine readable files, AI text files, markup, or Markdown to appear in Google Search (including its generative AI capabilities), as Google Search itself doesn't use them." It adds that LLMS.txt files will "neither harm nor help your site's visibility or rankings in Google Search, as Google Search ignores them."

That makes the priority order clear for JavaScript sites. Fix rendering first, so the content exists in HTML. Fix access second, so crawlers get a 200. Extra files for other AI services are optional and come after both.

Frequently Asked Questions

Can Google index JavaScript content?

Yes. Google queues pages for rendering, and a headless Chromium renders the page and executes the JavaScript when resources allow. Google then indexes the rendered HTML. If content is not visible in the rendered HTML, Google cannot index it.

Do AI crawlers execute JavaScript?

The sources we cite do not say which AI crawlers run JavaScript, so we do not assume either way. Google notes that not all bots can run JavaScript, which is why we put important content in server-rendered HTML.

Is server side rendering better for SEO?

For crawlability, yes. Server-side and static rendering put the full content in the first HTML response, so crawlers do not need to run scripts to read it. Google calls server-side or pre-rendering a great idea for users and crawlers.

How do I check if my content is in the raw HTML?

Open view-source or fetch the URL without a browser, then search the response for your H1, opening paragraph, links and JSON-LD. Then compare it with what a browser shows after scripts run.

Does blocking JavaScript files in robots.txt hurt SEO?

It can. Google says it will not render JavaScript from blocked files or on blocked pages, so blocking script files can leave Google with an empty app shell instead of your content.

Free AI Visibility Check

Is your content in the HTML crawlers receive?

Run the free checker to see how your homepage responds to AI crawler user agents and what your robots.txt allows.