InvisibleRank
back to all guides

Technical Signals · P1.3

Why AI bots can't read your JavaScript site (and what to do about it)

tl;dr

Most AI crawlers don't execute JavaScript. If your site is built as a single-page app that renders content in the browser, bots see <div id="root"></div> and nothing else. The fix: server-side render, prerender, or add a dynamic rendering layer.

// your move

See what AI assistants say about your site.

Free, 30 seconds, no signup. We'll check all 15 signals and tell you which ones to fix first.

Run the audit
§ 01

How to tell if you have this problem

  1. 01Open your homepage in a browser, right-click, and pick 'View Page Source' (not Inspect — source).
  2. 02Search for a sentence you can see on the page.
  3. 03If the sentence is in the source HTML, you're fine.
  4. 04If the source is mostly empty and your content lives inside <div id="root"> or similar, you have a JavaScript rendering problem.
  5. 05Confirm with curl: curl https://yoursite.com | grep 'your sentence'. No match means the bot sees nothing.
§ 02

Option 1: Server-side rendering (best long-term)

Render the page on the server and ship full HTML on the first request. Then hydrate client-side. The bot gets the content; the user gets the interactivity.

Next.js, Nuxt, SvelteKit, TanStack Start, Remix, and Astro all do this. If you're on Create React App or pure Vite, migrating is a one-week project for a small site.

§ 03

Option 2: Prerendering (fastest fix)

Generate static HTML for each route at build time. The bot fetches a snapshot. Users still get the SPA experience after.

Tools: prerender.io, react-snap, Vite SSG, Astro. If your content doesn't change minute-to-minute, this is the cheapest path.

// tool we'd actually reach for

NitroPack

Fix your site speed for AI crawlers.

Check out NitroPack

affiliate link — we may earn a commission

§ 04

Option 3: Dynamic rendering (transitional)

Detect bot user agents and serve them a prerendered version. Serve the SPA to humans. Google publicly tolerates this; AI bots accept whatever you give them.

This is a stopgap. Long-term, move to SSR or static.

Generate static HTML for each route at build time.

§ 05

How to verify the fix

  1. 01Run curl -A 'GPTBot/1.0' https://yoursite.com > test.html
  2. 02Open test.html in a browser. If you see your real content rendered, you're done.
  3. 03Run the same test with -A 'PerplexityBot/1.0' and -A 'ClaudeBot/1.0' to confirm coverage.
  4. 04Re-run the InvisibleRank audit.

Common questions

Does Googlebot execute JavaScript? Why don't AI bots?

Googlebot does, but with a delay and at high cost. AI bots prioritize speed and breadth over JS execution. Most of them treat your page as static HTML.

I'm on Webflow / Framer / Wix — am I safe?

Mostly yes. These platforms ship server-rendered HTML by default. Check view-source on a real page to confirm.

What about lazy-loaded content?

If it's below the fold and loads on scroll, AI bots probably won't see it. Render critical content in the initial HTML.

Keep reading

// your move

See what AI assistants say about your site.

Free, 30 seconds, no signup. We'll check all 15 signals and tell you which ones to fix first.

Run the audit ⚡