Skip to content

JavaScript SEO: what Google renders and AI crawlers never see

Google runs your scripts before it indexes a page; the crawlers behind ChatGPT, Claude and Perplexity read only the HTML your server sends. How to check what each one gets, and the rendering choices that serve both.

Portrait of Leon Missoul

Leon Missoul5 min read · Published 25 Nov 2026

  • Google renders JavaScript in a headless Chrome, later than it crawls, so content a script adds usually reaches Google in the end.
  • AI crawlers read the HTML as served. Text, links, structured data and forms that only appear after scripts run are missing for ChatGPT, Claude and Perplexity.
  • Server-side rendering or static generation gives everyone the whole page. Google calls it a great idea, because not every bot can run JavaScript.

How Google handles JavaScript

Google processes a JavaScript page in three phases: crawling, rendering and indexing. Googlebot fetches the HTML and queues the page; when Google’s resources allow, a headless Chromium runs the scripts, and Google indexes what it rendered. The wait can be seconds or longer, and Google may skip rendering for a page that answers with an error or carries a noindex.

Two things follow from that:

  • Content that needs a script arrives later, after the second pass.
  • What the HTML says counts first. If the server’s HTML says noindex, Google may never run the script that would have removed it. Google recommends setting the canonical in the HTML, and keeping it the same if a script touches it.

What AI crawlers do with JavaScript

The crawlers behind ChatGPT, Claude and Perplexity read the HTML your server sends and run no scripts. When Vercel and MERJ studied crawler traffic across Vercel’s network, none of the major AI crawlers rendered JavaScript, OpenAI’s, Anthropic’s and Perplexity’s included: ChatGPT’s and Claude’s crawlers fetched JavaScript files and never ran them. Common Crawl says the same of its own crawler: JavaScript is not executed.

The exceptions are the crawlers built on a browser: Googlebot, which Gemini relies on too, Bing’s crawler and Applebot. Google’s own JavaScript guide puts it plainly: 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.”

For AI search, then, the HTML as served is the page.

Four ways a page can be built

ApproachWhat the server sendsGoogleAI crawlers
Static generationThe whole page, built ahead of timeReads it at onceRead it
Server-side renderingThe whole page, built for each requestReads it at onceRead it
HybridThe page, which scripts then make interactiveReads it at onceRead it, minus anything loaded afterwards
Client-side renderingAn empty shell and a scriptReads it after renderingSee an empty page
What each approach sends, and who can read it

Most modern frameworks, such as Next.js, Nuxt, SvelteKit and Astro, render on the server or ahead of time by default. Single-page apps built with React, Vue or Angular alone render in the browser.

What goes missing, even on server-rendered sites

A site can render on the server and still hide parts of its pages from AI crawlers:

  • Text loaded after the page: reviews, prices, FAQs or product details fetched by a script.
  • Tabs and accordions filled on click. If the text isn’t in the HTML until someone opens the panel, crawlers never see it. A <details> element shows and hides text without a script.
  • Links added by scripts: a menu of buttons, a carousel or a “load more” list with no <a href> in the HTML. Google only follows links written as <a> elements with an href, and a crawler that runs no scripts can’t follow them at all.
  • Structured data added by a tag manager. Google sees it after rendering; AI crawlers never do.
  • Forms embedded with a script, so an assistant can’t tell a visitor the page has one.
  • Email addresses hidden by Cloudflare’s email protection, which crawlers read as “[email protected]”.
  • Canonical, title or robots tags that a script changes, which gives Google two versions of the page.

How to check what a crawler sees

Three checks, from quickest to most thorough:

  1. View the page source, not the inspector: that’s the HTML as served. Search it for a sentence from the middle of the page.
  2. Turn JavaScript off in the browser’s developer tools and reload. What’s left is roughly what an AI crawler reads.
  3. Use URL Inspection in Search Console and look at the crawled page’s HTML to see what Google rendered.

Do it for one page of each kind (home, service, article, product, category), since each template renders its own way.

JavaScript SEO fixes that work

  • Render the main content on the server, or generate it at build time.
  • Use real links (<a href="/pricing">) and the History API for routing, never # fragments.
  • Return real status codes. A single-page app that answers every address produces soft 404s; Google suggests redirecting to an address that returns a 404, or adding a noindex tag with JavaScript.
  • Put structured data in the HTML, through the CMS template or an SEO plugin, not a tag manager.
  • Keep the canonical, title and robots tags in the server’s HTML, and never let a script change them.
  • Lazy-load only what’s below the fold. Images and text that show first belong in the first HTML.

Serving bots a separate pre-rendered copy, called dynamic rendering, still works, but Google calls it a workaround rather than a recommended solution. Rendering the real page on the server serves people and crawlers alike.

Next.js, React and single-page apps

  • React on its own renders in the browser. A single-page app built with Vite or Create React App sends an empty <div id="root">. Add a framework that renders on the server, or pre-render the pages that should be found.
  • Next.js renders on the server by default. The usual leak is content fetched in a client component after the page loads; fetch it on the server instead.
  • Site builders serve their own content as HTML; embeds from other services, such as reviews, booking widgets and forms, are usually scripts.

How Orbit checks rendering

Health’s AI readiness loads one page of each kind in a browser and also reads it as served, then says how each kind of page is built (served whole, partly after JavaScript, or drawn in the browser) and what appears only once scripts run. When a sampled page is empty without scripts, the other pages of that kind that serve as little are flagged too, and when most kinds of page are empty to an AI crawler, AI readiness can’t score above 20. Our own site is built with Next.js: on 18 November 2026, all nine kinds of page Health read were served whole. Health starts on Ascend.

How each kind of page is built: served whole, or partly after scripts run.

Next, see which AI crawlers to let in, and how scripts affect Core Web Vitals.

Written by

  • Portrait of Leon Missoul

    Leon Missoul, Founder

    I started the web agency Luniq in 2025 and built Orbit from the software we used to keep our clients’ sites growing after launch. I write about search, AI answers and how to prove what website work earns.

Questions about AI search

AI Mode is a tab in Google Search where people ask a question in their own words and get a written answer from Google’s AI, with follow-up questions and links to the sources it used. It sits beside the regular results and AI Overviews, so a site can be named in one and missing from the other.

AI Overviews are the short AI-written answers Google shows above the regular results for many searches, with links to the pages they draw on. Being one of those linked pages puts a site above every regular result.

Yes. AI assistants that look things up find pages through search, and Google’s AI answers link to pages from its own index. A site that search engines can crawl, understand and trust is also the site AI answers can cite.

llms.txt is a proposed file at the root of a site that lists its most useful pages for AI models, in plain text. It is not an official standard, and none of the large AI assistants has confirmed that it reads the file, so it is optional. Clear pages that crawlers can reach matter far more. Health shows whether you have one and whether its links work, without counting it in the score.

Generative engine optimization is the work of getting a site named and cited in answers from AI assistants such as ChatGPT, Gemini and Google’s AI. It builds on SEO: clear answers, specific facts and a site that other trusted sites mention.

Answer engine optimization means writing pages so that search engines and AI assistants can lift a direct answer from them: the question answered in the first lines, then the detail. It started with Google’s featured snippets and voice search, and now covers AI answers too.

Mostly, yes. They are different names for making a site show up in AI answers. AEO is the older term, from featured snippets; GEO and LLM SEO came with ChatGPT and Google’s AI. The work behind all three is the same.

Answer the questions buyers ask in plain words, near the top of the page, and back the answer with specifics such as prices, numbers and cases. Make sure crawlers can reach the site, and get it mentioned on other sites in the field. Then keep asking the same questions to see whether it works.

Put what you read to work

Connect your site and Orbit measures what these articles cover: searches, AI answers, site health and leads. Every new site starts with all of Orbit, free to try.

Ask Orbit

Answers from every page of goorbit.io

Ask about what Orbit does, what it costs, or how it fits the way you work. Each answer links to the page that covers it.

Try asking