Why Can't AI See Your Website? The JavaScript Trap — and How to Avoid It
Your site might be beautiful — but if the content is built with JavaScript, most AI bots see a half-empty page. With a fresh measurement example, we show how to spot it in 5 minutes and exactly what to ask your developer.

There's an awkward paradox many hotels fall into without ever realising it: their website is beautiful in the browser, but empty for AI. Gorgeous images, subtle animations, a modern design — and yet ChatGPT, Perplexity or Claude sees an almost entirely blank page.
This isn't a theoretical problem. It's one of the most common — yet most hidden — reasons a hotel gets left out of AI answers. The most frustrating part is that it's invisible to the naked eye: to you, the site works perfectly.
The root cause: most AI bots don't run JavaScript
To understand why, we need to take one step back into the technical side. I promise it will make sense.
When you open a website, your browser does two things. First, it downloads the raw HTML from the server. Then it runs the JavaScript, which on many modern sites only builds the actual content at that point: the text, the room descriptions, the prices. For you, this happens instantly and imperceptibly.
But most AI bots — OpenAI's OAI-SearchBot, PerplexityBot, ClaudeBot — stop at the first step. They download the raw HTML and read that. They don't run JavaScript. So if your content only appears after the JS has run, the bot sees an empty shell: a few container elements, a pile of script references, and no meaningful text.
The eye sees the site as beautiful. The AI bot sees it as empty.
There's nothing for it to read, so there's nothing for it to cite. That's how you get left out of the answers — not because your hotel is poor, but because your content is technically invisible.
How do you find out if you're affected?
Fortunately, there's a simple test anyone can run. Open your website, right-click on an empty area, and choose “View Page Source” (Ctrl+U or Cmd+Option+U). This shows the raw HTML — exactly what the bot sees.
Now look for your text: the room descriptions, the wellness section, your key messages. If they're there in the source code: great, your site can be extracted. But if you can barely find any text — just script elements and empty content containers — then your content is JS-dependent, and the bots can't see it.
A fresh measurement of ours: beautiful site, half-empty page
To show just how far from theory this is, here's the result of a fresh, real audit at a Hungarian four-star wellness hotel (we won't name it, because the phenomenon is what matters, not the hotel):
The homepage has 17 section headings: package deals, family activities, couples' experiences, seasonal offers. The guest sees all of it. In the raw HTML, however, 14 of the 17 have zero text beneath them: the card content is loaded by JavaScript. In other words, the AI bot knows nothing about exactly those offerings that would make a guest choose the hotel. The rest of the site is fine — the bot sees around 720 words. It's just missing half of what matters.
This is the typical case: the site isn't “empty”, it's half-loaded. And because the bot sees half of it, the owner can quite reasonably believe everything is in order.
Two things that kill visibility
Alongside the JS trap there's a sibling problem: slowness. It's worth looking at the two together.
- •Content is rendered from JS
- •The bot gets empty HTML
- •Symptom: empty source code
- •Fix: SSR / SSG / prerender
- •The page loads slowly
- •The bot times out before it reads it
- •Symptom: high LCP, heavy images
- •Fix: cache, CDN, image optimisation
The logic is similar: in both cases the bot can't access the content — once because it isn't there in the raw HTML, and once because it doesn't reach the end in time.
What should you do? — the solution
The good news: this is fixable, and most of it is a one-off job. The goal is simple: the essential content should be there in the raw, server-side HTML.
-
1
Move content server-side
Put important text in the raw HTML — using server-side rendering (SSR) or static generation (SSG).
-
2
Enable SSR
If your site is built on Next.js / Nuxt, use server-side rendering — no rebuild needed.
-
3
Prerender for a pure SPA
If your site is a classic single-page app with no server rendering, set up a prerender (static export or a prerender service).
-
4
Measure and speed it up
Optimise images (WebP), put a CDN in front, enable caching — so the bot reaches the end in time.
What to ask your developer? — a copy-paste list
If you're not the one touching the code, send these four requests to your developer — they'll do verbatim:
-
1
“The section text on the homepage and key pages should be in the server-side HTML”
SSR, SSG or prerender, depending on the framework's capabilities.
-
2
“The text in sliders and cards should also be in the raw HTML”
The visual rendering can stay JS-based, but the text source should not be.
-
3
“Check: all our main text should be searchable in the Ctrl+U source view”
This is the acceptance test: five minutes, and anyone can do it.
-
4
“The robots.txt should allow AI bots (GPTBot, ClaudeBot, PerplexityBot)”
While we're at it, let's sort this out in the same round.
Who runs JavaScript and who doesn't?
The situation isn't black and white, so it's worth seeing exactly which bot can do what:
| Bot | Runs JS? | What it means for you |
|---|---|---|
| Googlebot (classic search) | Yes, with a delay | Your Google index may still be fine |
| Google AI (AI Overview / AI Mode) | Partly, built on Google's index | Whatever Google sees, the AI answer can build on |
| OAI-SearchBot / GPTBot (OpenAI) | No | ChatGPT sees the raw HTML |
| PerplexityBot | No | Perplexity sees the raw HTML |
| ClaudeBot (Anthropic) | No | Claude sees the raw HTML |
The table explains the most dangerous illusion: everything looks fine in Google, so you assume it's fine in AI too — while the bots of ChatGPT, Perplexity and Claude are reading your raw, JS-free page.
A common misconception
Many people think that if Google indexes their site, everything is fine — after all, Googlebot runs JavaScript. That's partly true: Google is more advanced and sees a lot of JS content. But the other AI bots aren't as forgiving: the bots of OpenAI, Anthropic and Perplexity typically don't run JS. So you can be perfectly indexed in Google and, at the same time, invisible to ChatGPT and Perplexity.
Mentio measures this automatically
You don't need to be a developer to know whether you're affected. The AI Tech module checks how much visible text is in the raw HTML, detects the JS trap, and raises a red flag if your site is rendered from JavaScript. Alongside the specific issues, it provides practical fixes tailored to hotels, and it also measures speed (Core Web Vitals) so you can see the sibling problem too.
Because the first step is always the same: knowing whether AI sees what the guest sees.

The biggest shift of the past few years is that search itself has changed: guests no longer necessarily choose from ten blue links — they ask an AI model where to stay. ChatGPT, Claude, Gemini, Perplexity — and now Google itself, with AI Mode and AI Overviews. And the answer is no longer a list of results, but two or three specific hotel names: a decision already made.
Frequently asked questions
How do I know if my site is affected?+
Open your site's source view (Ctrl+U or Cmd+Option+U) and search for your main text. If your room descriptions, wellness text or package copy isn't there in the raw HTML, your content is JavaScript-dependent, and most AI bots can't see it.
Google can see JS content — so why is this a problem?+
Googlebot does indeed run JavaScript, so your Google index may be fine. But the bots of OpenAI, Anthropic and Perplexity typically don't run JS, so you can be invisible in ChatGPT and Perplexity even while ranking well in Google.
Do I have to rebuild the website to fix this?+
Rarely. In most modern frameworks (Next.js, Nuxt, WordPress) server-side rendering or prerender can be enabled, and the key is to get the main text into the raw HTML. This is typically a one-off developer job, not a rebuild.
How much content is enough in the raw HTML?+
There's no magic number, but the practical minimum is to have meaningful text beneath every important section. Our audit considers a homepage healthy above 300 words — and separately checks whether there's text under the section headings before the JS runs.
Read these next
- Does AI Drive Bookings? Real Numbers from Three of Our Hotels782 AI sessions, 30 days, three Hungarian hotels: we show how often today's AI-referred guest books compared with organic traffic, and why…
- Google AI Overview: is the age of the Google SERP over? — what every hotel needs to knowOur latest fleet-wide measurement shows that two-thirds of hotel searches now greet guests with an AI summary — and most hotels aren't in…
- AI visibility for hotels: how to get recommended by ChatGPT, Gemini and PerplexityMore and more guests ask AI assistants for accommodation recommendations. What do AI visibility and GEO mean for hotels — and what concrete…