This week on X, someone described a plumbing company's AI-built site: real service pages, six blocks of structured data, and a blank page to any crawler that didn't run JavaScript. That is the same shape I keep seeing when a marketing site comes out of a coding agent as a Vite + React app and ships with the default index.html.
The title is still Vite + React. The body is <div id="root"></div>. The services, the phone number, the reviews, and the JSON-LD all live in a useEffect. curl sees none of it. Chrome looks finished, so nobody notices until Search Console or an assistant-search result comes back empty.
Googlebot can render JavaScript, but it does not always wait, and the first look at the response is still the raw HTML. A lot of AI crawlers are closer to curl than to a full browser. Social previews are too: Slack, LinkedIn and X read the HTML you sent, not the tree React built after hydration.
It doesn't matter whether the site came from Cursor, Claude Code or an AI website builder. If the HTML response is a shell, this applies.
So I wrote the kind of site a coding agent produces for "a roofing company in Denver with services, reviews and a quote form." Then I wrote a short checker, crawler_view.py, that reads the raw HTML — no JavaScript — and reports the title, the visible word count, whether #root is empty, and whether any JSON-LD facts are missing from the visible text. I ran it on the shell, on a prerendered page that still invented 214 reviews, and on a prerendered page that only marks up what's on the page. All the numbers below come from those three runs.
The fixture
The business is fictional. It's called Redbird Roofing, and it does residential roof repair in Denver. The "before" repo looks like a typical generated SPA: a Vite index.html and a React tree that injects both the page and the schema in the browser.
Here is the file that actually gets deployed, before any prerender step. This is the whole document.
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite + React</title> <script type="module" src="/src/main.jsx"></script> </head> <body> <div id="root"></div> </body> </html> The useful page lives in App.jsx. A useEffect appends the JSON-LD after mount. That includes an aggregateRating of 4.9 from 214 reviews, because the prompt asked for reviews and the model is happy to invent a number that looks like social proof.
// Excerpt from the fixture. Deliberately typical of a generated marketing SPA. useEffect(() => { const el = document.createElement("script"); el.type = "application/ld+json"; el.text = JSON.stringify(schema); // includes aggregateRating 4.9 / 214 document.head.appendChild(el); }, []); If you open the site in a browser, you see a roofing company. If you view source, you see an empty root and a scaffolding title.
The checker
crawler_view.py reads a local HTML file — or an index.html under public/, dist/ or build/ — and parses it with the standard library. It does not execute JavaScript, so the report is what curl, a basic crawler, or the first look at a response body can see.
It reports:
- the
<title>and meta description - any
<h1>in the raw HTML - a visible word count, with
scriptandstyleremoved (a<noscript>block does count, because a no-JS client can read it) - empty app shells:
#root,#app,#__next,#__nuxtwith almost no text inside - every
application/ld+jsonblock, its types, and whether telephone, address, price,ratingValueandreviewCountalso appear in the visible text
Default titles it treats as scaffolding include Vite + React, Create Next App, React App and a few cousins. A US phone number in schema may be written as +1-303-555-0148 while the page shows (303) 555-0148; the checker compares digits, not punctuation.
It does not render the page, does not claim to be Google's renderer, and does not fetch a live site. Point it at an HTML file you already have, including a response you saved with curl -o page.html https://yoursite.example/.
#!/usr/bin/env python3 """crawler_view.py — show what of a page is visible without running JavaScript. Usage: python3 crawler_view.py fixtures/before python3 crawler_view.py path/to/index.html python3 crawler_view.py --self-test Reads the raw HTML (a local file, or a directory containing index.html, public/index.html or dist/index.html). It does not execute JavaScript, so the report is what a curl, a basic crawler, or Google's first look at the response body can see. Findings: default title — Vite + React, Create Next App, and similar scaffolding crawler-blank — almost no visible text, often an empty #root / #app missing H1 — no <h1> in the raw HTML no JSON-LD — no application/ld+json block in the raw HTML invented schema — JSON-LD facts that do not appear in the visible text This does not render the page, does not claim to be Google's renderer, and does not fetch a live site unless you pass a raw HTML file you already saved. """ from __future__ import annotations import argparse import json import re import sys import unittest from dataclasses import dataclass, field from html.parser import HTMLParser from pathlib import Path DEFAULT_TITLES = { "vite + react", "vite + vue", "vite + svelte", "vite app", "vite", "react app", "create next app", "create react app", "next.js", "document", "nuxt", "nuxt app", "sveltekit", "astro", "welcome to vite", "just a moment...", "just a moment…", } ROOT_IDS = {"root", "app", "__next", "__nuxt"} SKIP_TAGS = {"script", "style", "template", "noscript"} # noscript is visible to a no-JS client, so it is NOT skipped for text. SKIP_TAGS = {"script", "style", "template"} WORD_RE = re.compile(r"[A-Za-z0-9][A-Za-z0-9'’.-]*") PHONE_RE = re.compile(r"\+?\d[\d\-().\s]{6,}\d") BLANK_THRESHOLD = 40 # JSON-LD keys whose values should also be visible on the page. FACT_KEYS = { "telephone": "telephone", "phone": "telephone", "email": "email", "streetaddress": "street address", "addresslocality": "city", "addressregion": "region", "postalcode": "postal code", "ratingvalue": "ratingValue", "reviewcount": "reviewCount", "ratingcount": "ratingCount", "pricecurrency": "priceCurrency", "price": "price", "lowprice": "lowPrice", "highprice": "highPrice", } @dataclass class SchemaFact: key: str label: str value: str visible: bool kind: str # "text" | "phone" | "rating" | "count" | "price" @dataclass class Report: path: Path title: str = "" meta_description: str = "" h1s: list[str] = field(default_factory=list) visible_text: str = "" word_count: int = 0 empty_roots: list[str] = field(default_factory=list) jsonld_blocks: list[object] = field(default_factory=list) jsonld_types: list[str] = field(default_factory=list) jsonld_errors: list[str] = field(default_factory=list) facts: list[SchemaFact] = field(default_factory=list) findings: list[str] = field(default_factory=list) @property def invented(self) -> list[SchemaFact]: return [f for f in self.facts if not f.visible] class PageParser(HTMLParser): def __init__(self) -> None: super().__init__(convert_charrefs=True) self.title_parts: list[str] = [] self.meta_description = "" self.h1s: list[str] = [] self._h1_buf: list[str] = [] self.visible: list[str] = [] self.ldjson: list[str] = [] self._ld_buf: list[str] = [] self.skip = 0 self.in_title = 0 self.in_h1 = 0 self.in_ld = 0 self.in_head = 0 self.root_text: dict[str, list[str]] = {} self._root_stack: list[str] = [] def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None: if tag == "head": self.in_head += 1 ad = {k.lower(): (v or "") for k, v in attrs} if tag == "meta": name = ad.get("name", "").lower() prop = ad.get("property", "").lower() if name == "description" or prop == "og:description": if ad.get("content") and not self.meta_description: self.meta_description = ad["content"].strip() if tag == "title": self.in_title += 1 if tag == "h1": self.in_h1 += 1 self._h1_buf = [] if tag == "script": typ = ad.get("type", "").lower() if typ in {"application/ld+json", "application/json+ld"}: self.in_ld += 1 self._ld_buf = [] else: self.skip += 1 return if tag in SKIP_TAGS: self.skip += 1 return eid = ad.get("id", "") if eid in ROOT_IDS: self._root_stack.append(eid) self.root_text.setdefault(eid, []) def handle_endtag(self, tag: str) -> None: if tag == "head" and self.in_head: self.in_head -= 1 if tag == "title" and self.in_title: self.in_title -= 1 if tag == "h1" and self.in_h1: self.in_h1 -= 1 text = _norm("".join(self._h1_buf)) if text: self.h1s.append(text) self._h1_buf = [] if tag == "script" and self.in_ld: self.in_ld -= 1 self.ldjson.append("".join(self._ld_buf)) self._ld_buf = [] return if tag in SKIP_TAGS or tag == "script": if self.skip: self.skip -= 1 return if self._root_stack and tag in {"div", "main", "app"}: # pop only when this end tag likely closes the root we opened. # HTMLParser doesn't give us identity; we pop if the top root # already received some end of a container. Safer: only pop on # explicit close of div when stack is non-empty and skip==0. pass def handle_data(self, data: str) -> None: if self.in_ld: self._ld_buf.append(data) return if self.skip: return if self.in_title: self.title_parts.append(data) if self.in_h1: self._h1_buf.append(data) # Title, meta and other head text are not page body. if self.in_head or self.in_title: return self.visible.append(data) for rid in self._root_stack: self.root_text[rid].append(data) def handle_startendtag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None: self.handle_starttag(tag, attrs) self.handle_endtag(tag) def _norm(s: str) -> str: return re.sub(r"\s+", " ", s).strip() def _words(s: str) -> list[str]: return WORD_RE.findall(s) def _digits(s: str) -> str: return re.sub(r"\D+", "", s) def _national_phone(s: str) -> str: """Best-effort national number: strip a leading country code 1 from NANP numbers.""" d = _digits(s) if len(d) == 11 and d.startswith("1"): return d[1:] return d def resolve_html(target: str) -> Path: p = Path(target) if p.is_file(): return p if not p.is_dir(): raise SystemExit(f"not a file or directory: {p}") for cand in ( p / "index.html", p / "public" / "index.html", p / "dist" / "index.html", p / "out" / "index.html", p / "build" / "index.html", ): if cand.is_file(): return cand raise SystemExit(f"no index.html under {p}") def _collect_types(node: object, out: list[str]) -> None: if isinstance(node, list): for item in node: _collect_types(item, out) return if not isinstance(node, dict): return typ = node.get("@type") if isinstance(typ, list): out.extend(str(t) for t in typ) elif typ: out.append(str(typ)) graph = node.get("@graph") if graph: _collect_types(graph, out) for key, val in node.items(): if key in {"@type", "@graph"}: continue if isinstance(val, (dict, list)): _collect_types(val, out) def _walk_facts(node: object, out: list[tuple[str, str]]) -> None: if isinstance(node, list): for item in node: _walk_facts(item, out) return if not isinstance(node, dict): return for key, val in node.items(): if key.startswith("@"): if key == "@graph": _walk_facts(val, out) continue lk = key.lower() if lk in FACT_KEYS and isinstance(val, (str, int, float)): out.append((lk, str(val).strip())) elif isinstance(val, (dict, list)):...
