Many modern websites build their pages with JavaScript in the visitor’s browser. That works well for people, but it can leave AI crawlers looking at an almost empty page. If your product details, prices or articles only appear after JavaScript runs, some AI tools may never see them. That is why JavaScript rendering for AI crawlers has become an important part of technical GEO.
Google has handled JavaScript for years, so many teams assume every bot can. That assumption no longer holds. Several of the crawlers that feed popular AI assistants read the raw HTML your server sends and stop there.
In this guide, you’ll learn how rendering works, which crawlers are known to run JavaScript, how to test what AI crawlers actually see and seven practical steps to make dynamic sites readable for AI search.
What Is JavaScript Rendering for AI Crawlers?
JavaScript rendering for AI crawlers means making sure the important content on your pages is available to AI bots, whether or not they run JavaScript. In practice, it usually means sending key text, links and structured data in the initial HTML from your server, instead of building them only in the browser.
The goal is simple: the content you want AI tools to understand and cite should be visible in the page source, not hidden behind scripts.
How Rendering Works
To understand the problem, it helps to know where a page’s content is put together.
Client-Side Rendering
With client-side rendering, the server sends a mostly empty HTML file and a bundle of JavaScript. The visitor’s browser runs the JavaScript, fetches data and builds the page. A bot that does not run JavaScript only sees the empty shell.
Server-Side Rendering
With server-side rendering, the server builds the full HTML for each request. Visitors and bots receive complete content straight away, and JavaScript can still add interactive features afterwards.
Static Rendering
Static rendering, also called static site generation, builds pages ahead of time and serves them as ready-made HTML files. It is fast and very easy for crawlers to read.
Hydration
Hydration combines both approaches. The server sends complete HTML, then JavaScript in the browser “hydrates” the page so it becomes interactive. Most modern frameworks support this pattern.
Which Crawlers Run JavaScript?
Search engines and AI companies rarely publish full details of their crawlers, so independent testing is the best evidence available. A late-2024 analysis of crawler traffic by Vercel and MERJ found a clear divide.
| Crawler | Renders JavaScript? | What the Study Found |
|---|---|---|
| Googlebot | Yes | Renders pages using a modern browser engine |
| Gemini | Yes | Uses Googlebot’s infrastructure, so it shares the same rendering |
| AppleBot | Yes | Uses a browser-based crawler that processes JavaScript |
| OpenAI crawlers (ChatGPT) | No | Fetch JavaScript files but do not execute them |
| Anthropic crawler (Claude) | No | Fetch JavaScript files but do not execute them |
| Common Crawl (CCBot) | No | Does not render pages, and its data is often used to train language models |
Crawlers change over time, so treat this as a snapshot rather than a permanent rule. The safe approach is to assume that at least some important AI crawlers will only read your raw HTML.
Why This Matters for GEO
If an AI crawler cannot read your content, it cannot use it to answer questions about your brand. The effects can be easy to miss because your site still looks perfect to human visitors.
Common Problems Caused by Client-Side Rendering
- Product descriptions, specifications and prices are missing from AI answers
- Blog posts and guides are never cited because the crawler saw only a loading message
- Internal links built with JavaScript are not discovered
- Structured data injected by scripts is never read
- AI answers about your site are incomplete or outdated
Imagine a hypothetical online furniture store built as a single-page app. Each product page sends only a title and a script tag in its HTML. Shoppers see full descriptions, dimensions and prices, but an AI crawler that does not run JavaScript sees almost nothing. When someone asks an AI assistant for a compact oak desk under a certain budget, the store’s products are unlikely to appear because the assistant has no details to work with.
Google’s own documentation makes a similar point. Its JavaScript SEO basics guide says server-side or pre-rendering is still a great idea because it makes sites faster for users and crawlers, and not all bots can run JavaScript.
Step 1: Test What AI Crawlers Actually See
Before changing anything, find out whether you have a problem. The quickest test is to look at your pages without JavaScript.
Simple Tests Anyone Can Run
- Open a page and use your browser’s “View page source” option, not the developer tools inspector
- Search the source for a sentence from the main content
- Turn off JavaScript in your browser settings and reload the page
- Check whether headings, links and prices still appear
Technical Tests for Developers
- Fetch the page with a command-line tool and inspect the HTML that comes back
- Compare the raw HTML with the rendered HTML in Google Search Console’s URL Inspection tool
- Run a crawler tool with JavaScript rendering switched off
- Check your server logs to see which AI bots visit and which pages they request
If important content only appears once JavaScript runs, that content is at risk for AI search.
Step 2: Prioritize Your Most Important Pages
You do not have to rebuild your whole site at once. Start with the pages that matter most for AI visibility.
Pages to Fix First
- Your homepage and about page
- Product, service and pricing pages
- Key guides, articles and comparison pages
- Frequently asked questions and help content
- Location and contact pages
These are the pages AI tools are most likely to use when describing what you offer. Fixing them first gives you the biggest benefit for the least work.
Step 3: Use Server-Side Rendering or Static Rendering
The most reliable fix is to send complete HTML from your server. Google recommends server-side rendering, static rendering or hydration as long-term solutions.
Choosing a Rendering Method
| Method | Best For | AI Crawler Friendly? |
|---|---|---|
| Static rendering | Blogs, documentation, marketing pages | Yes |
| Server-side rendering | Frequently changing pages such as products and prices | Yes |
| Hydration | Interactive apps that also need readable content | Yes |
| Client-side rendering only | Logged-in dashboards and private tools | No |
| Dynamic rendering | Short-term fixes on older sites | Partly, but not recommended long term |
Popular frameworks such as Next.js, Nuxt, SvelteKit and Astro support server-side or static rendering. If your site already uses one of these, the change may be a configuration setting rather than a rebuild.
Step 4: Keep Client-Side Rendering for Extras Only
You do not need to remove JavaScript from your site. Use it for features that improve the experience but are not essential to understanding your content.
Good Uses for Client-Side JavaScript
- Live chat widgets and pop-ups
- View counters and social media feeds
- Interactive calculators and filters
- Animations and visual effects
Content That Should Be in the HTML
- Headings, main text and article content
- Product names, descriptions, specifications and prices
- Author names, dates and business details
- Navigation and internal links
- Structured data such as Organization, Product and FAQ markup
Once that content is readable, how you organize it still matters. The guide to structuring content for AI search covers headings, lists and answer-first writing.
Imagine a hypothetical software company whose pricing page loads its plans from an API after the page opens. People see three clear plans, but AI crawlers see an empty table. The development team changes the page to render the plans on the server and keeps only the monthly and yearly toggle in JavaScript. The plan names and prices are now readable by every crawler.
Step 5: Make Links and URLs Crawlable
Crawlers discover pages by following links. If your links are built in a way bots cannot follow, whole sections of your site may stay hidden.
Link Best Practices
- Use standard <a> elements with an href attribute for every important link
- Avoid links that only work through click events in JavaScript
- Give each page its own real URL instead of loading content through fragments such as “#/products”
- Use the History API for routing in single-page apps
- Include important pages in your XML sitemap
Google’s documentation says it can only discover links that are <a> elements with an href attribute, and it recommends the History API over fragments for single-page apps. For more on how links help AI understand your site, see the guide to internal linking for GEO.
Step 6: Handle Errors and Metadata on the Server
Client-side apps often get the details wrong in ways that confuse crawlers.
Details to Check
- Return a real 404 status code for missing pages instead of a normal page saying “not found”
- Set page titles and meta descriptions in the server-rendered HTML
- Place canonical tags in the initial HTML
- Avoid adding or changing robots meta tags with JavaScript
- Make sure lazy-loaded content still appears in the HTML when it is important
Google warns about “soft 404” errors in client-side single-page apps, where a missing page returns a success code. Server rendering makes it much easier to send the right status codes and metadata.
Step 7: Avoid Relying on Dynamic Rendering
Dynamic rendering means detecting bots and serving them a pre-rendered version of the page while people get the client-side version. Some older sites still use it.
Google’s dynamic rendering documentation calls it a workaround and not a long-term solution because it adds complexity and resource requirements. It also depends on recognizing every bot correctly. New AI crawlers appear regularly, and any bot your system does not recognize will still receive the empty shell.
If you use dynamic rendering today, treat it as a bridge while you move to server-side, static or hydrated rendering. Make sure the pre-rendered content matches what people see.
Don’t Forget Access Rules
Rendering only matters if crawlers can reach your pages in the first place. Check that your robots.txt file allows the AI crawlers you want, and that firewalls or bot protection services are not blocking them by accident.
The guide to AI crawlers and robots.txt explains how to manage access for each bot. A page that is readable but blocked is just as invisible as one that needs JavaScript.
Common Mistakes to Avoid
These mistakes often stop dynamic sites from being understood by AI tools.
- Testing only in Google Search Console and assuming every crawler works the same way
- Checking pages in the browser inspector instead of the raw page source
- Loading main content from an API after the page opens
- Hiding important text inside tabs or accordions that only load on click
- Adding structured data only with tag managers or scripts
- Using fragment URLs for different pages
Most of these are easy to fix once you know they are there.
JavaScript and AI Crawlers Checklist
Use this checklist to review your site.
- Main content appears in the raw page source
- Key pages use server-side, static or hydrated rendering
- Client-side JavaScript is used only for non-essential extras
- All important links are <a> elements with real URLs
- Titles, canonicals and structured data are in the initial HTML
- Missing pages return real 404 status codes
- robots.txt and firewalls allow the AI crawlers you want
- Server logs are checked regularly for AI crawler activity
Conclusion
JavaScript can make websites fast and engaging, but it can also hide your best content from AI crawlers that only read raw HTML. The safest approach is to render important content on the server, keep client-side scripts for extras, use crawlable links and test what bots actually receive.
If you would like help checking how AI crawlers see your website, contact our team to discuss a technical GEO review.
Frequently Asked Questions
Do AI crawlers run JavaScript?
Some do and some do not. A late-2024 study by Vercel and MERJ found that Googlebot, Gemini and AppleBot render JavaScript, while the crawlers used by ChatGPT and Claude fetch JavaScript files but do not execute them.
If Google can see my content, can AI tools see it too?
Not necessarily. Google renders JavaScript, but several AI crawlers only read the raw HTML. Content that appears in Google Search may still be invisible to those AI tools.
How can I check what an AI crawler sees?
View the raw page source or turn off JavaScript in your browser. If your main text, links and prices are missing, crawlers that do not run JavaScript will miss them too.
Do I need to rebuild my website?
Usually not. Many modern frameworks support server-side or static rendering, so you can often switch key pages to these methods with configuration changes. Start with your most important pages.
Is dynamic rendering a good solution?
Google calls dynamic rendering a workaround rather than a long-term solution. It recommends server-side rendering, static rendering or hydration instead.
Can I still use JavaScript on my site?
Yes. Use JavaScript for interactive extras such as chat widgets, calculators and animations, but make sure your main content, links and structured data are in the HTML sent by the server.
Does structured data added with JavaScript work for AI crawlers?
Google can read structured data added with JavaScript after rendering, but crawlers that do not run JavaScript will miss it. Placing structured data in the server-rendered HTML is the safer choice.
