Technical

Why Your React Site Is Invisible to ChatGPT

AI crawlers do not run JavaScript, so websites built in the browser look empty to them. Here is the test, what we found on our own site, and four fixes.

Nikhil Mishra, Founder & CEO
· Updated · 7 min read

If your website is built with React, Vue, Angular or Next.js and renders its content in the browser, then ChatGPT, Perplexity and Claude most likely see a completely empty page when they visit. Not thin content. Not badly written content. Nothing at all. OPSYRA checks this automatically as the first step of its audit, because it makes every other kind of optimisation pointless, and it then scores each page for how easily an AI could quote it once the content is actually readable.

This is the most damaging technical problem in AI search, and it is invisible in every normal check you run. Your website looks fine in a browser. It looks fine in Google, which does run JavaScript. The problem only appears when you fetch it the way an AI crawler does.

The thirty second test

Run this on any page you care about:

curl -s -A "GPTBot/1.0" https://yoursite.com/your-page \
  | tr '\n' ' ' | sed -e 's/.*<body>//' -e 's|</body>.*||' -e 's/<[^>]*>/ /g' | wc -c

That prints how many characters of readable text an AI crawler receives. Read it like this:

  • Under about 200: your content is invisible to AI crawlers. Everything else is blocked until you fix this.
  • 200 to 2,000: partial. You are probably serving a shell plus a loading message. Look at what is actually in there.
  • Over 2,000: your HTML carries real content. Move on to structure and quotability.

What we found on our own website

We build an AEO platform. We ran this test on our own marketing pages and got zero.

Four and a half kilobytes of page header, with all the meta tags and structured data written carefully, and not one character of readable text in the body. Every page. An AEO product that no AI engine could read.

It is an easy mistake to make, which is exactly why we are publishing it. The website was built with Vite and React and deployed as static files. Every check we ran looked healthy. The meta tags were immaculate. Google indexed it, because Google does run JavaScript on a second pass. Nothing surfaced the problem until we fetched a page the way an AI crawler would.

A second problem came with it, and these two usually travel together. Because the website served the same file for every address, every page carried the homepage's canonical tag. Seven pages, all telling Google they were duplicates of one page.

Why crawlers work this way

Running a full browser for every page is expensive, roughly ten to a hundred times more processing than simply reading HTML, plus the waiting time for scripts to finish. Google absorbs that cost because rendering is central to how it works, and even Google delays it to a second pass that can lag behind the first crawl by days.

An AI crawler building a library of content has different economics and no particular reason to pay that cost. So it fetches, reads, extracts the text and moves on. If the text is not in the HTML, there is no text.

Do not assume this will change. Plan for raw HTML being all they read.

The four fixes

1. Prerendering, best for marketing websites

If your public pages are the same for everyone, generate them as real HTML files when you build the site. Each page becomes an actual file with actual content, served directly.

This is what we did, and it suited us for one specific reason: no migration. We kept the existing React components exactly as they were and added a small step that renders only the public pages into HTML at build time, while the logged-in dashboard stays as it was.

Measured on our article pages, the readable text went from zero to over eleven thousand characters, with correct canonical tags and a working set of internal links that had not existed before.

If you are on Vite, this is roughly a day of work and needs no change of framework.

2. Server side rendering, best for content that changes

Next.js, Nuxt, SvelteKit and Remix render pages on the server for each request. The right answer if your pages are genuinely personalised or change constantly. The wrong answer if you are choosing it only to fix crawling, because option one gets the same result for a fraction of the effort.

3. A mix, static marketing and browser rendered app

Usually the right architecture, and what most products end up with. Public pages are static or server rendered. The logged-in application stays in the browser, where crawling does not matter anyway.

One thing to watch: serve your app pages an empty shell rather than a prerendered marketing page, or signed-in users get a flash of your homepage before the app loads.

4. Serving crawlers separately, last resort

Detect crawlers and serve them prerendered HTML while people get the normal site. It works, and Google has historically tolerated it, but it is fragile. You maintain a list of crawler names forever, new crawlers are invisible by default, and if the two versions drift apart you are showing search engines something different from what users see, which is a policy problem. Use it only if the others are genuinely unavailable.

Check your canonical tags too

If your website serves one file for every address, check what canonical tag it contains:

for p in / /pricing /about /blog; do
  echo -n "$p -> "
  curl -s "https://yoursite.com$p" | grep -o '<link rel="canonical"[^>]*>' | head -1
done

If every line prints the same address, every page on your website is telling Google it is a duplicate of one page. Google will believe you and drop the rest. It is one hardcoded tag, and it can suppress an entire website.

What to do this week

  1. Run the test on your five most important pages.
  2. If the body comes back empty, pick a fix. Option one unless you have a reason not to.
  3. Check whether your canonical tags differ per page.
  4. Confirm that /llms.txt and /robots.txt return plain text rather than your HTML shell. A catch-all fallback quietly turns both into HTML, and clients cache the result.
  5. Run the test again and confirm the number moved.

None of this is glamorous and none of it will appear in a content strategy deck. It is also the difference between being a candidate for citation and not existing.

If you would rather not check this by hand across a whole website, OPSYRA runs it on every page automatically and flags the ones AI engines cannot read, alongside a quotability score for the pages they can.

Frequently asked questions

Does GPTBot run JavaScript?

No. GPTBot fetches and reads raw HTML and does not run JavaScript, and the same applies to the crawlers used by Perplexity and Claude. Content that your framework adds to the page after loading is invisible to them, so a website that renders in the browser looks empty no matter how much content it really has.

Does Google run JavaScript for AI Overviews?

Googlebot does run JavaScript, on a delayed second pass after the first HTML crawl, and AI Overviews draws on Google's index. So a browser rendered website can eventually appear there. However the delay is real, rendering is not guaranteed for every page, and it does nothing for ChatGPT, Perplexity or Claude, which use their own crawlers.

How do I test what an AI crawler sees on my website?

Fetch the page with curl using an AI crawler's user agent and look at the body: curl -s -A "GPTBot/1.0" https://yoursite.com/page. If the area between the body tags is empty or contains only a root div and script tags, your content is invisible to that crawler. Turning JavaScript off in your browser's developer tools gives a quicker rough version of the same check.

Is prerendering the same as cloaking?

No, as long as both audiences get the same content. Prerendering generates the page's real HTML ahead of time and serves it to everyone, so people and crawlers see the same thing. Cloaking means deliberately showing crawlers something different from what users see. The risk sits with option four above, where the two versions are generated separately and can drift apart.

Will fixing this get me quoted by ChatGPT straight away?

No. Making your content readable is a requirement, not a guarantee. Once crawlers can read you, being quoted still depends on content quality, your authority on the topic, how recent it is, and for buying questions especially, whether websites the engine trusts mention you. Fixing rendering removes a blocker rather than winning a citation.

Start today

See what AI says about your business

Your free audit checks ChatGPT, Gemini and Perplexity and shows you what to fix first. No card needed.