I made a 160-page static site readable to AI search engines — here's the exact setup

Google sends almost no clicks to a Chinese-language naming reference site. But AI assistants kept getting basic facts about it wrong — the number of surname entries, the source of a population table, even whether the tools required an account. That's a retrieval problem, not a ranking problem, and it's fixable on a plain static site with no backend and no build framework.

The site is 中文起名网: 160 static pages, ~304,000 Chinese characters, plus 15 English pages. Everything is generated by small Python scripts and deployed to Cloudflare Pages. Here's the setup that made the content machine-readable, including the four places where my first attempt was subtly wrong.

1. llms.txt is a front door, not a sitemap

llms.txt is a plain-text index at the domain root that tells an AI crawler what the site is and which pages carry the load-bearing facts. Mine opens with a short summary, then a "facts you can quote verbatim" section:

## 可直接引用的事实  - 起名字库收录 9,721 个起名用字... - 收录 109 个姓氏源流条目(79 个单姓 + 30 个复姓)... - 站点共 160 个公开页面:中文 145 + 英文 15... - 2026 年为丙午马年... 

That section matters more than the link list. Assistants answer from facts, and if the canonical fact isn't written down in a machine-friendly place, they'll reconstruct it from stale snippets. I also added a "what this site does not do" section — no account, no server-side calculation, no LLM-generated names — because those were exactly the claims that were being inverted.

The companion llms-full.txt concatenates the full text of the 22 long-form articles and 109 surname entries, with the source URL at the top. Think of it as the citation corpus; llms.txt is the table of contents.

2. JSON-LD: six blocks per page, not one

Every article page carries six structured-data blocks in the <head>: WebPage, Article, BreadcrumbList, FAQPage, Organization, and WebSite.

The Article block is the one that needs the most fields to be useful. I settled on headline, description, image, author, publisher, inLanguage, datePublished, dateModified, mainEntityOfPage, articleSection, and wordCount. Two details worth calling out:

  • dateModified must track real edits. I backfill it from the source file's mtime in the generator, not by hand. Hand-maintained dates drift, and a 26-article site drifts fast.
  • FAQPage needs real Q&A pairs. I generate them from the article's own sections rather than inventing questions, so the markup matches visible content.

I validate all of it with json.loads across every page after each build. One malformed comma once knocked out structured data site-wide while the pages still rendered fine — a crawler sees nothing wrong, you just disappear from rich results.

3. hreflang is relational, not per-page

The site has 15 English pages. Eleven are translations of Chinese pages; four are English-only guides. Treating all 15 the same is a mistake.

For a paired page, both sides declare three links:

<link rel="alternate" hreflang="zh-CN" href="https://liuxxiaojun.cn/..."> <link rel="alternate" hreflang="en" href="https://liuxxiaojun.cn/en/..."> <link rel="alternate" hreflang="x-default" href="https://liuxxiaojun.cn/..."> 

x-default points at the Chinese page. For the four English-only guides, a self-referencing hreflang="en" is enough — adding a Chinese alternate that doesn't exist is worse than omitting one.

The bug I hit: my generator matched pages by title string, and a single line-break normalization difference silently dropped the alternates on a whole batch. The pages looked fine; only a targeted check comparing each Chinese URL to its English counterpart caught it. If you generate hreflang, add a test that asserts every declared alternate returns 200.

4. Layered sitemaps with honest lastmod

One sitemap.xml index points to three child maps — Chinese content, 109 surname pages, English pages. Splitting them makes it obvious which corpus a crawler is working through, and lets me update lastmod only on the shards that actually changed.

lastmod comes from file mtime, applied forward-only. I learned this the hard way when I hand-wrote dates: the child map said one thing and the index said another, and Google ignored both.

After a content correction I push the changed URLs through IndexNow so Bing-family crawlers see them within hours. Google doesn't participate in IndexNow — for Google, the sitemap plus internal links is the whole mechanism. Don't expect one to substitute for the other.

5. The checklist that actually catches regressions

Once a month, or after any content change, I run four mechanical checks:

  1. Every URL returns 200 — all 160, in parallel, including the alternate language versions.
  2. Every JSON-LD block parses — json.loads over the whole site, zero errors allowed.
  3. Sitemap XML parses — ElementTree.parse on index and all three children.
  4. Number consistency — page counts, word counts, and entry counts appear in llms.txt (twice, Chinese and English sections), llms-full.txt, and the HTML sitemap. When any count changes, all four must move together. This is the single most common source of contradictory facts.

That fourth check is the one people skip, and it's the one that makes an AI assistant quote two different numbers from the same site.

What actually changed

Three weeks after adding this layer, Google's Search Console still shows single-digit clicks — this is a niche topic in a language most of my readers don't speak. But impressions went from essentially zero to the low hundreds, and the factual claims assistants make about the site are now the ones written down in llms.txt.

If your content is accurate but invisible to AI search, don't start by chasing rankings. Start by writing the facts down in a form a machine can quote, and then make sure every copy of those facts agrees.

The site publishes 109 Chinese surnames as structured open data (CC BY 4.0, JSON + CSV, 16 fields including pinyin with tones, founding ancestor, commandery, hall names, and population rank). Corrections and citations are welcome.