# Why JavaScript-heavy websites struggle with AI crawlers

Many AI crawlers read only the HTML your server sends and do not run JavaScript. If your site builds its text, links and prices in the browser, those crawlers see an empty shell, so AI assistants cannot quote or recommend your pages. Google can render JavaScript, but with a delay. Serving complete HTML through server-side or static rendering fixes both problems.


## The problem in plain terms

Many AI crawlers fetch your page, read the HTML that comes back, and leave. They do not run your JavaScript. If your website relies on JavaScript in the browser to insert its headings, service descriptions, prices and links, those crawlers receive a nearly empty page. AI assistants then have little or nothing from your site to quote, summarize or recommend.

This is not a theory. In [The rise of the AI crawler](https://vercel.com/blog/the-rise-of-the-ai-crawler), published in December 2024, Vercel analyzed crawler traffic across its network and found that none of the major AI crawlers it measured rendered JavaScript. That included OpenAI's crawlers, Anthropic's ClaudeBot, Meta's crawler, Bytespider and PerplexityBot. ChatGPT and Claude crawlers did download JavaScript files, 11.50% and 23.84% of their requests respectively, but did not execute them. Crawler behaviour can change, so treat this as the current baseline to design for.


## How Google differs from AI crawlers

Google can run JavaScript. Its [JavaScript SEO basics guide](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics) describes three phases: crawling, rendering and indexing. Pages go into a render queue, where they may wait a few seconds or longer, before a headless Chromium browser runs the scripts. Google still recommends server-side rendering or pre-rendering because it makes sites faster for users and crawlers, and it notes that not all bots can run JavaScript.

| Crawler | Runs JavaScript? | What it means for you |
|---|---|---|
| Googlebot | Yes, after a render queue | Content is seen, sometimes with a delay |
| Gemini | Yes, via Googlebot infrastructure (per Vercel) | Follows Google's rendering |
| Applebot | Yes, browser-based (per Vercel) | Content is seen |
| GPTBot and other OpenAI crawlers | No (per Vercel) | Needs content in the raw HTML |
| ClaudeBot | No (per Vercel) | Needs content in the raw HTML |
| PerplexityBot | No (per Vercel) | Needs content in the raw HTML |


## What AI crawlers actually see


### The empty shell problem

Single-page apps and some site builders send a small HTML file containing little more than a page title, a script tag and an empty container. The browser downloads the script, calls an API and fills the page. People see a full page. A crawler that does not run scripts sees the empty container. The same applies to content loaded on scroll, content behind tabs that only loads on click, and navigation menus built from JavaScript without real links.

AI crawlers also stumble on broken URLs more often than Google does. The same Vercel study found that 34.82% of ChatGPT's fetches and 34.16% of Claude's hit 404 pages, against 8.22% for Googlebot. Clean redirects after any URL change matter even more when these bots are trying to reach you. Our [301 redirect checklist](https://tcomconsultants.com/blog/website-migration-301-redirects/) explains how to handle them.


### Know which bot does what

AI companies run several bots for different jobs. OpenAI's [crawler overview](https://developers.openai.com/api/docs/bots) explains that OAI-SearchBot surfaces sites in ChatGPT search, GPTBot gathers content that may be used to train models, and ChatGPT-User fetches pages when a user asks ChatGPT to. Each can be allowed or blocked separately in robots.txt. Perplexity's [crawler page](https://docs.perplexity.ai/guides/bots) describes PerplexityBot, which indexes sites for Perplexity search results, and Perplexity-User, which loads pages in response to a user's question.


#### Do not block the bots you want

If you want to appear in AI search answers, make sure robots.txt, your firewall and any bot protection service are not blocking the search-related crawlers. You can block training crawlers and still allow search crawlers, since the settings are independent. Rendering fixes do nothing if the bot is turned away at the door.


## How to check your own site

1. Open a key page, right-click and choose View page source (not Inspect). Search for a sentence from the main content. If it is not there, crawlers that skip JavaScript cannot see it.
2. Run a plain request from a terminal, for example curl with your page URL, and read the HTML that comes back.
3. Turn off JavaScript in your browser settings and reload the page. What remains is roughly what non-rendering bots receive.
4. In Google Search Console, use URL Inspection and view the crawled page to compare Google's rendered HTML with your source.
5. Check that menus and internal links are real anchor tags with href values in the source.

Test service pages, location pages, product pages and pricing first. Those are the pages AI assistants are most likely to quote.


## How to fix it

The fix is to send complete HTML in the first response. The web.dev article [Rendering on the Web](https://web.dev/articles/rendering-on-the-web) explains the options. Static rendering builds each page as HTML ahead of time. Server-side rendering builds HTML on each request. Hydration then adds interactivity on top of server-rendered HTML. Most modern frameworks support these modes, so the change is often a configuration and architecture decision, not a full rebuild.

- Render headings, body text, prices, addresses and FAQs in the server HTML.
- Use real links with href values for navigation and internal links.
- Put title tags, meta descriptions, canonical tags and structured data in the initial HTML.
- Keep chat widgets, maps, calculators and personalization client-side if you like; they are not core content.
- Return proper status codes: a real 404 for missing pages, not a 200 with an error message drawn by JavaScript.
- Keep sitemaps current and URLs stable, so crawlers find the rendered pages.

If you are planning a new build on a headless CMS, decide the rendering method before design starts. Our guide to [headless CMS for business owners](https://tcomconsultants.com/blog/headless-cms-explained/) covers this, and our comparison of [static sites and WordPress](https://tcomconsultants.com/blog/static-site-vs-wordpress/) explains why plain HTML is so reliable for crawlers.


## How Tcom can help

We build sites designed to send complete HTML to crawlers. [LimousineWorldwideServices.com](https://tcomconsultants.com/work/limousine-worldwide-services/) serves 1,757 pages, including 196 city pages, with an llms.txt file and an OpenAPI-documented lead API. Learn what we mean by an [AI-ready website](https://tcomconsultants.com/answers/what-is-an-ai-ready-website/), see what affects [website development cost](https://tcomconsultants.com/answers/website-development-cost/), explore our [website development service](https://tcomconsultants.com/services/website-development/), or [contact us](https://tcomconsultants.com/contact/) for a crawler visibility check.

## Sources

- The rise of the AI crawler (Vercel): https://vercel.com/blog/the-rise-of-the-ai-crawler
- Understand JavaScript SEO Basics (Google Search Central): https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics
- Rendering on the Web (web.dev): https://web.dev/articles/rendering-on-the-web
- Overview of OpenAI Crawlers (OpenAI): https://developers.openai.com/api/docs/bots
- Perplexity Crawlers (Perplexity): https://docs.perplexity.ai/guides/bots

Source: https://tcomconsultants.com/blog/javascript-seo-and-ai-crawlers/
