When a site has twenty pages, you can keep every title, internal link and robots tag in your head. When it crosses 400 indexable pages across guides, glossary terms, templates, platform reviews, comparisons, buyer lists and tools, memory stops working. A renamed slug breaks six links. An empty category accidentally enters the sitemap. Two comparison pages start sounding identical.
Early in Hauntboard's life, we hit exactly those problems: sixteen of twenty-eight category pages were indexed with zero launches on them, and thin comparison routes slipped into search before they had real copy. Instead of promising to be more careful, we moved the rules into code so the build fails before a bad page ever deploys.
One Source of Truth for Indexing
The easiest way for indexing bugs to happen is splitting the rule across three files: one check in the page metadata, another in the XML sitemap, and a third in the HTML hub. Fix one, forget another, and you end up submitting noindex URLs to Google.
Every gated family on Hauntboard now reads a single function from lib/seo/gates.ts. The page's robots tag, the XML sitemap, the HTML sitemap and the hub links all call the same helper:
| Page family | Indexing gate |
|---|---|
| Category hubs | At least 3 public launches in that category; switches on automatically once reached |
| Platform reviews & comparisons | Platform must be hand-checked; comparison must have its own written entry, not a bare table |
| Glossary terms | Family switch enabled plus at least 300 words of real prose |
| Copyable templates | Family switch enabled, at least 500 words, and at least one [placeholder] in the template block |
| Stack comparisons | Family switch enabled, at least 550 words, 4 or more comparison rows, and 2 or more HTTPS vendor sources |
| Platform hubs & alternatives | Hub needs 8+ checked platforms and 300+ words; alternatives need 6+ checked picks and 350+ words |
| Opt-in maker profiles | At least 2 public launches, or 1 public launch plus 1 published maker story |
Each new content family also carries a boolean kill-switch constant. If Search Console ever tells us a family is getting crawled without being indexed, we can pull the entire family out of search in one line while we rewrite it.
Split Child Sitemaps by Page Family
One giant sitemap hides problems. If Google indexes 310 of 430 URLs in a single flat file, you have to dig to learn whether the skipped pages are glossary entries, platform comparisons or thin launch pages.
Our sitemap code in lib/seo/sitemaps.ts serves /sitemap.xml as a sitemap index pointing to one child sitemap per family at the site root: /sitemap-guides.xml, /sitemap-glossary.xml, /sitemap-templates.xml, /sitemap-compare.xml, /sitemap-platforms.xml, /sitemap-comparisons.xml, /sitemap-tools.xml, /sitemap-best.xml, /sitemap-blog.xml, /sitemap-tech.xml, /sitemap-categories.xml, /sitemap-launches.xml, /sitemap-stories.xml, /sitemap-makers.xml and /sitemap-pages.xml.
Any family with zero eligible URLs is left out of the index completely, and every entry uses a real last-modified date that only moves when the underlying data changes. Submitting the index lets us watch indexed-versus-submitted ratios per family without guesswork.
Automated Quality Tests in CI
Before any batch ships, lib/seo/quality.test.ts scans the full content dataset in seconds and rejects the build if anything breaks:
- Internal link integrity: extracts every internal link from guides, posts, glossary entries, templates, comparisons, platform guides, best lists, stack pages and both AI summary files, and verifies each target exists in our set of real, indexable routes. Long-form guides and blog posts must also link to at least three other pages.
- Unique titles and descriptions: checks case-insensitively across families so two pages never compete with identical titles or meta descriptions.
- Word-count floors: enforces 1,000 words on founder guides, 600 words on blog posts, and every family's specific floor from the gate file.
- Voice and link hygiene: blocks em dashes and banned marketing hype phrases, requires
https://on external links, and prevents platform slugs from colliding with reserved routes such asfree,for,alternativesor-vs-. - Near-duplicate detection: splits every page inside a family into 5-word shingles and computes the overlap against every other page in that family. If any pair shares more than 35% of the smaller page's 5-word phrases, the test fails.
That 35% shingle rule is especially helpful on structured families like platform guides, comparisons and templates, where boilerplate sentences creep in fast if you aren't watching. We wrote more about that philosophy in our guide to programmatic SEO without spam.
Keeping AI Crawler Files in Sync
We publish llms.txt and a longer llms-full.txt so AI search tools have a clean map of the site. Hand-maintained directory files almost always go stale, so we split them in two: the explanatory prose is written by hand, while the lists of guides, blog posts and checked platforms sit between <!-- generated:… --> markers.
Running npm run llms regenerates those blocks straight from the live data modules, and a dedicated test fails whenever the files drift behind. If you are setting up the same crawler plumbing on your own product, our guide on getting found in AI search walks through the practical pieces. Everything else about how we check facts and label opinions sits on our editorial policy page.