跳到正文
DEV Community· Łukasz B.·· 40 分鐘前AI 評分64

AI 爬蟲與智能體如何讀取網站:5 分鐘檢查方法

🔥 What AI bots and AI agents actually see on your website (and how to check it in 5 minutes) #3

AI 導讀

文章説明 AI 爬蟲、用戶觸發的抓取器與瀏覽器智能體各自如何讀取網站,並提供 5 分鐘檢查方法。GPTBot、ClaudeBot、PerplexityBot 等 AI 爬蟲大多不執行 JavaScript;Googlebot 會執行,而瀏覽器智能體則透過截圖、DOM 和無障礙樹理解頁面。

正文

Hi again 👋 In my last post, How AI search picks fragments, I took apart the AI search pipeline: fan-out → retrieval → reranking → generation. I promised that #3 would show how to measure brand visibility in AI answers. It's coming, I promise. But first we need to take one step back, because one question keeps coming up in your comments and in the audits I do:

"Can ChatGPT even see my React site?"

That whole pipeline has a precondition: the AI has to read your page first. And what an AI bot sees often looks nothing like what you see in your browser 🤯

In this post I will explain:

  1. Who actually visits your site: 3 types of AI
  2. AI crawlers: they only see raw HTML
  3. Google is the exception (but not a free pass)
  4. AI agents: screenshot, DOM and the accessibility tree
  5. What this means for React, Next.js & co.
  6. Check it yourself in 5 minutes
  7. Checklist
  8. Myths I keep seeing on LinkedIn

🤔 Who actually visits your site: 3 types of AI

When someone says "AI visits my site", they usually throw three very different things into one bag. And each of them sees your page differently.

Type Examples What it does Runs JS?
Crawlers (training and index) GPTBot, ClaudeBot, OAI-SearchBot, PerplexityBot fetch pages regularly, build an AI search index or collect training data mostly no
User-triggered fetchers ChatGPT-User, Claude-User, Perplexity-User fetch a specific page because a user asked about it or pasted a link in tests: no (ChatGPT-User)
Browser agents ChatGPT Atlas (Agent Mode), Chrome auto browse, Perplexity Comet open the page in a real browser, click, fill in forms, buy things yes, because they run in a browser

💡 The SEO consequence: "can AI see my site?" has no single answer. You have to ask: which AI, and for what.

🕷️ AI crawlers: they only see raw HTML

The key data here comes from a study by Vercel and MERJ (December 2024). They analyzed bot traffic across Vercel's network and checked which bots execute JavaScript.

The result was clear:

Bot Renders JavaScript?
GPTBot, OAI-SearchBot, ChatGPT-User (OpenAI) ❌ no
ClaudeBot (Anthropic) ❌ no
PerplexityBot ❌ no
Meta-ExternalAgent, Bytespider, CCBot (Common Crawl) ❌ no
Googlebot (also for Gemini) ✅ yes
AppleBot ✅ yes

The most interesting detail? These bots download JavaScript files (GPTBot in 11.5% of requests, ClaudeBot in almost 24%), but they don't run them. They fetch the code and do nothing with it 🙃

What does that mean in practice? If your site is a classic client-side rendered (CSR) app, an AI bot gets roughly this:

<!DOCTYPE html>
<html>
  <head><title>Super Shop</title></head>
  <body>
    <div id="root"></div>
    <script src="/static/js/main.4f8a2c.js"></script>
  </body>
</html>

An empty <div id="root">. No product description, no price, no links. For ChatGPT, Claude and Perplexity, this page simply has no content.

A few things worth knowing:

  • The study is almost two years old, but newer tests (for example the experiment described on Search Engine Land) show the same thing: AI crawlers stop at the JavaScript boundary.
  • Links added by JS don't exist either. If your navigation, pagination or product links appear only after a script runs, the bot won't find those pages.
  • AI bots waste a lot of time on errors. In the same study, over 34% of ChatGPT and Claude requests hit a 404 (Googlebot: about 8%). Redirects, sitemaps and stable URLs matter.
  • AI companies don't fully document rendering. So treat this data as a strong starting point, not gospel. The final source of truth is your own server logs (I'll show you how to check them below).

💡 The SEO consequence: AI doesn't "prefer" clean HTML. It only sees HTML. Content that appears only after JavaScript runs never reaches retrieval, so it can't be cited.

🟢 Google is the exception (but not a free pass)

Googlebot renders JavaScript using Chromium, and Gemini and Google's AI search features use the same infrastructure. That's why a React site can be visible in AI Overviews and completely missing from ChatGPT and Perplexity.

But "Google renders" doesn't mean "everything is fine":

  • Rendering takes resources. Google has to fetch and execute your scripts, and an error in one JS file can hide all your content.
  • What Google renders doesn't help other systems. Copilot uses Bing's index, ChatGPT has its own bots and search partners. Each has its own limits.

💡 The SEO consequence: if you only checked in Google Search Console that "the page renders", you checked one of several search systems you care about.

🤖 AI agents: screenshot, DOM and the accessibility tree

Agents are a completely different story. They don't build an index. They work in a real browser on behalf of a user: comparing offers, filling in forms, adding to cart. JavaScript isn't the problem here, because the browser runs it.

The problem is something else: does the agent understand what's on the page and what it can click?

Google describes this in its guide to agent-friendly websites. Agents "see" a page in three ways:

Method How it works Weak spot
Screenshot a vision model recognizes elements in an image expensive, slow, confused by overlays and unusual design
Raw HTML / DOM the agent reads the code structure, attributes, nesting lots of noise that eats the model's context
Accessibility tree the browser reduces the DOM to roles, names and states of elements only as good as your HTML

The accessibility tree is the same "page map" screen readers have used for years to help blind and low-vision users. The browser builds it from your HTML. For an agent, it's a cheap, clean description of the page: here's an "Add to cart" button, here's an "Email" field, here's a "Pricing" link.

Different agents lean on different methods. According to Search Engine Journal, OpenAI's agent combines screenshot analysis with the DOM and the accessibility tree, and tools like Playwright MCP give models the accessibility tree instead of an image. The shared conclusion: good HTML structure helps every one of these methods.

A real-life example:

❌ The agent struggles ✅ The agent understands
<div class="btn" onclick="addToCart()">Add</div> <button type="submit">Add to cart</button>
<span onclick="go('/pricing')">Pricing</span> <a href="/pricing">Pricing</a>
a magnifying glass icon with no text <button aria-label="Search">
a form field with no label <label for="email">Email</label>

A <div> with a click handler looks like a button to a human. In the accessibility tree it's just text. An agent may miss it or not know it can be clicked.

Lighthouse already scores sites for agents

In 2026 Google added an experimental Agentic Browsing category to Lighthouse. According to the Chrome documentation, it checks, among other things:

  • accessibility from an agent's point of view: element names and labels, correct roles in the accessibility tree, visibility,
  • layout stability (CLS) and the presence of an llms.txt file,
  • integration with WebMCP, a proposed standard that lets a page tell an agent directly which actions it offers.

There's no 0–100 score, just the number of checks passed. The whole category is experimental and based on proposed standards, so treat it as a signal of direction, not a new ranking factor.

💡 The SEO consequence: accessibility is no longer "just" a compliance topic. A page a screen reader can't use is also a problem for an AI agent that's supposed to buy something on it.

⚛️ What this means for React, Next.js & co.

Good news: you don't have to drop React. You just need to care about where the HTML is produced.

Rendering method What an AI bot gets Verdict
CSR (client-side rendering, e.g. plain Create React App, Vite SPA) an empty shell + scripts ❌ content invisible to AI crawlers
SSR (server-side rendering, e.g. Next.js, Nuxt, Remix) full HTML on every request ✅
SSG / ISR (static generation) ready HTML from cache ✅ fastest and cheapest
Prerendering for bots a separate HTML version for bots ⚠️ works, but content easily drifts apart

The rule, which Vercel also gives in its recommendations: critical content on the server, extras on the client.

  • On the server: main text, headings, prices, specs, FAQs, navigation, internal links, metadata, structured data.
  • Fine on the client: chat, view counters, social widgets, personalization, interactive features.

🧪 Check it yourself in 5 minutes

Don't take my word for it. Here are four tests I run in every audit 🔍

1. Turn off JavaScript in your browser

In Chrome, open DevTools, press Ctrl+Shift+P (Cmd+Shift+P on Mac), type Disable JavaScript and reload. What you see is very close to what an AI crawler sees.

2. Fetch the page like a bot

curl -sL -A "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)" \
  https://yoursite.com/product | grep -i "a phrase from the product description"

If grep returns nothing, but you can see the text in your browser, the content is added by JavaScript.

⚠️ Note: changing the user agent won't show IP-based blocks. If your CDN or WAF (e.g. Cloudflare) blocks AI bots, curl from your laptop will get through and the real GPTBot won't.

3. Check your server logs

This is the only source of truth about what bots really fetch. The simplest version for Apache/Nginx-style logs:

# how many requests and which response codes
grep -E "GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-SearchBot|PerplexityBot" access.log \
  | awk '{print $9}' | sort | uniq -c | sort -rn

# which URLs they fetch most often
grep -E "GPTBot|OAI-SearchBot|ClaudeBot|PerplexityBot" access.log \
  | awk '{print $7}' | sort | uniq -c | sort -rn | head -20

Look for three things: do the bots come at all, do they get a 200 (not a 403 or 404), and do they fetch the pages you care about.

4. Look at the accessibility tree

In DevTools, in the Elements panel, turn on the Show accessibility tree toggle. Click through your buttons, links and form fields. If an element has no role (button, link, textbox) or no name, an agent will struggle with it too.

Bonus: run Lighthouse and check whether your Chrome version already has the Agentic Browsing category.

✅ Checklist

For AI crawlers (visibility in answers)

  • Critical content is in the raw HTML, no JS needed (SSR, SSG or ISR).
  • Internal links are real <a href="...">, not onclick.
  • Prices, specs, availability and FAQs are in the HTML, not loaded client-side from an API.
  • Structured data (JSON-LD) comes from the server, not injected through Google Tag Manager.
  • robots.txt and CDN/WAF rules don't block the bots you want to let in. Verified in the logs.
  • Redirects and the sitemap are up to date, and bots don't hit 404s.

For AI agents (ability to act on the site)

  • Buttons are <button>, links are <a>. No clickable <div>s.
  • Every form field has a <label>, every icon button has an aria-label.
  • Headings form a logical hierarchy (h1 → h2 → h3).
  • No transparent overlays or popups covering the content.
  • Stable layout (low CLS), so a button doesn't "jump away" from a click.
  • Key actions (buy, book, sign up) work without complicated gestures.

🙅 Myths I keep seeing on LinkedIn

Myth Reality
"AI prefers clean HTML and rewards it." It's not a preference, it's visibility. Most AI crawlers don't run JS, so JS-only content simply doesn't exist for them.
"Googlebot renders JS, so I'm safe." That's true for Google and Gemini. ChatGPT, Claude and Perplexity use their own bots, which didn't execute JS in tests.
"Just add llms.txt and the JS problem goes away." llms.txt doesn't replace content in HTML. Google says no special files are needed for AI Overviews.
"I checked with curl and the GPTBot user agent, so I know what the bot sees." You see the content, but not IP-based CDN/WAF blocks. Server logs give the final confirmation.
"Accessibility is a topic for lawyers and EAA compliance." The accessibility tree is one of the main maps AI agents use. Poor accessibility = an agent that can't buy.
"AI agents are the future, I can ignore them for now." Agentic browsers are already available to users, and Lighthouse already scores sites for them. Better to fix your HTML now than later.

🧾 Summary

Before AI can cite your content, it has to read it. And what it reads depends on who comes to your site:

  • AI crawlers (GPTBot, ClaudeBot, PerplexityBot) see raw HTML and mostly don't execute JavaScript,
  • Google renders JS, but it's only one of the search systems you care about,
  • AI agents work in a browser and understand the page through screenshots, the DOM and the accessibility tree.

The good news? The fixes are exactly the good practices we've known for years: server-side rendering, semantic HTML and accessibility. Only now, skipping them costs you not just in Google, but also in ChatGPT, Perplexity and with every agent that's supposed to do something on your site 🚀

In my next post (#4) I'm back to my promise: I'll show step by step how to measure a brand's visibility in AI answers and how to turn it into a client report.

And you? Have you checked your logs for AI bots yet? Tell me in the comments what you found 👇

About the author ✍️

Łukasz, SEO AI Specialist at Afterweb. He has worked in SEO for years and today focuses on brand visibility in Google and in AI answers: from technical SEO, through data analysis and automation, to content and brand-mention strategy. He shares what he knows in the "How to become an SEO specialist" series, because he believes the best way to learn is practice and testing on real data.

Want to talk about SEO and your brand's visibility in AI? Visit afterweb.pl 🚀

Sources

來源:DEV Community · dev.to