llms.txt cannot replace missing page content, and crawler permission cannot
make client-rendered or private text retrievable. Stop and repair the first broken layer before adding
features to a later one.
Layer 0: establish one canonical documentation identity
Choose one public docs origin, normallyhttps://docs.example.com.
Before publishing any metadata that points there:
- Create the exact DNS record supplied by the docs platform.
- Confirm the hostname resolves through more than one public resolver.
- Confirm a valid TLS certificate is served.
- Confirm the root, a guide, a reference page, and discovery files return the intended content.
- Make every identity signal use the same host.
- redirects;
<link rel="canonical">;- Open Graph URLs;
- XML sitemap locations;
robots.txtsitemap declarations;- JSON-LD
urland@idvalues; llms.txtand Markdown links;- OpenAPI
servers; - Agent Cards, skills, MCP cards, and package metadata;
- links from the marketing site and product.
Move a documentation domain without splitting canonical signals
- Redirect the old host and old paths permanently to matching canonical paths with
301or308. - Preserve the path and query where appropriate; avoid redirecting every old page to the homepage.
- Keep redirects for as long as old links, packages, or model priors may exist.
- Update internal links, sitemaps, cards, contracts, and external profiles.
- Use one current brand name; explain a former name on one dated migration/entity page when needed.
- Crawl both old and new hosts after deployment to find chains, loops, split signals, and leaks.
Layer 1: serve crawlable canonical documentation HTML
Every indexable page should:- return
200for the canonical URL; - return meaningful article text in the initial HTML response;
- use a self-referencing canonical;
- have one visible article H1;
- use real
<a href>links for navigation and contextual links; - avoid
noindex, login, consent, challenge, or client-rendering barriers; - expose the same core facts to users and crawlers;
- have a stable URL that does not depend on a session or temporary token.
Return correct HTTP statuses for documentation pages
- Use a real
404or410for missing/retired pages, not a friendly error page returning200. - Use a permanent redirect for moved pages.
- Avoid redirect chains and locale/device redirects based only on guesses.
- Make root behavior deliberate: serve a useful index or permanently redirect to the canonical introduction/locale.
- Never expose private drafts because a platform’s “index hidden pages” setting was enabled globally.
Layer 2: publish an accurate documentation URL inventory
Publish only canonical documentation URLs in the XML sitemap
Publish a canonical sitemap and list it inrobots.txt.
The sitemap should contain:
- absolute HTTPS URLs on the canonical host;
- every intended indexable HTML page;
- only canonical
200pages; - meaningful
lastmodvalues when the page changed materially.
.mdalternates;- preview/staging hosts;
- redirected, missing, or
noindexpages; - parameter duplicates;
- incomplete translations and private drafts.
lastmod should describe a significant page change. Do not stamp every URL on
every build.
Build crawl paths with contextual internal links
The sitemap is not a replacement for a usable crawl path. Link from:- the marketing site to relevant guides, not only the docs homepage;
- the quickstart to the next implementation task;
- concept and decision pages to each implementation branch;
- reference operations to task guides and exact errors;
- errors back to their operation;
- changelog entries to migrations and affected pages.
Layer 3: make documentation HTML search-ready
Align titles, descriptions, headings, and URLs around one question
Every indexable page needs:- a unique title that states the task/error/decision and product context;
- a unique factual description, often around 140–160 characters;
- one article H1 aligned with the target question;
- sequential, descriptive H2/H3 headings;
- descriptive link text and meaningful image alt text.
Consolidate duplicate documentation URLs with canonical signals
Redirects andrel=canonical are strong canonical signals; sitemap inclusion is weaker. Keep all
signals aligned. A self-canonical page should not appear in the sitemap under another host, language,
or trailing-slash variant.
See Google’s canonical guidance.
Add structured data only for visible documentation content
Publish JSON-LD only when it describes visible, current content. Useful types may include:Organizationwith stable identity and evidence-backed profiles;WebSite;WebPage;BreadcrumbList;TechArticleor another accurate article type.
@id values, canonical URL, headline, description, publisher, mainEntityOfPage, and a
truthful dateModified where applicable. Mark up product, FAQ, review, rating, or HowTo data only when
the visible page qualifies and the markup can be maintained.
Structured data clarifies meaning and may enable search features. It does not guarantee ranking or an
LLM citation. Follow Google’s structured-data policies.
Keep documentation fast and accessible
Documentation must work on mobile, keyboard, and assistive technology. At minimum:- landmarks, skip links, focus states, labeled controls, and a logical heading outline;
- readable contrast and zoom behavior;
- text alternatives for meaningful images;
- tables with accessible headers;
- no essential information locked inside hover, animation, or a screenshot;
- stable rendering without intrusive overlays.
Layer 4: expose clean Markdown and machine-readable documentation
Preserve the complete answer in per-page Markdown
For technical documentation, expose a predictable Markdown representation such as/guide.md or
content negotiation with Accept: text/markdown.
A good Markdown response:
- returns
200with an accurate text/Markdown content type; - contains the same answer, version, warnings, links, code, and dates as HTML;
- keeps tables and image descriptions readable;
- removes navigation chrome, CSS, hydration state, and raw component implementation;
- identifies the canonical HTML URL through an HTTP
Linkrelation or a clear preamble; - is kept out of the search index with an appropriate
X-Robots-Tagwhen it would otherwise compete with the HTML canonical; - is not added to the canonical HTML sitemap.
Accept, send correct Vary headers and test cache behavior. If content varies by
user agent, include the relevant variation too; a separate .md URL is simpler when edge caching is
hard to control.
Do not accept Markdown merely because the endpoint exists. Read samples from every page template.
Interactive components often leak raw MDX/JSX or lose important content.
Use llms.txt as a documentation routing index
Treat llms.txt as a small routing file, not an SEO ranking trick and not a substitute for navigation.
Use:
- one clear H1 and a precise product definition;
- H2 groups that help a retriever route by job;
- a distinct task description for every link;
- canonical, working Markdown destinations;
- current version/deprecation instructions only when they are precise and maintainable;
- links to relevant product, locale, contract, changelog, pricing, limits, and trust surfaces;
- generated link and integrity checks on deploy.
llms-full.txt may help bulk ingestion, but it should be generated from the same source, size-monitored,
and never be the only route to a page.
The llms.txt specification is a proposal. Major search and model providers do
not currently document it as a general ranking factor. Measure target-client use instead of assuming
it.
Publish validated API contracts and capability catalogs
For API/event products, publish a validated OpenAPI or AsyncAPI contract at a stable URL. It should match production:- server URLs and environments;
- authentication and authorization;
- operation lifecycle;
- parameter types and formats;
- request and response examples;
- errors and retry behavior;
- pagination, idempotency, rate limits, and webhooks/events.
Layer 5: set documentation crawler policy by purpose
Do not use one “AI bots” switch. Decide what the business wants for:- conventional search indexing;
- answer-engine search/citation;
- user-requested fetches;
- model training.
robots.txt does not help
if the firewall blocks the request; a robots rule may not control every user-initiated fetch.
Provider behavior checked 2026-08-07; recheck primary documentation before changing policy.
For example, this
robots.txt allows conventional and answer-engine search while blocking one
training crawler. It is an example of the output shape, not a universal policy:
Layer 6: handle documentation versions and languages explicitly
Give materially different documentation versions stable URLs
- Give supported major versions stable URL namespaces when procedures differ.
- State the current/default version in entry pages and machine indexes.
- Keep old-version pages accessible while supported and clearly labeled.
- Redirect only when the replacement is behaviorally compatible.
- Link changelog, migration, old reference, and new reference together.
- Test that search does not select an obsolete version for current queries.
Give each complete documentation translation a stable locale URL
Use separate stable URLs such as/en/... and /ja/....
For every complete translation pair:
- set the correct page language;
- use a self-canonical within the locale;
- publish reciprocal
hreflangvalues and anx-defaultwhere appropriate; - link language alternatives without forced browser-language redirects;
- keep sitemap and machine indexes locale-aware;
- distinguish a missing translation from an accidental orphan.
Verify SEO and GEO output from the documentation platform
Verify Mintlify’s generated SEO and agent surfaces
Mintlify’s SEO configuration can generate semantic HTML, metadata, canonical signals, robots, sitemap, and schema. Itsllms.txt support can generate per-page Markdown, indexes,
and full-corpus output. The hosted docs MCP
adds a retrieval surface.
Use the platform, but verify the deployed result:
- configure and verify the custom domain before making it canonical;
- ensure every public page that should be discovered is intentionally in navigation/indexing;
- hand-write page descriptions so generated indexes have useful routing text;
- inspect Markdown from interactive components;
- verify locale alternates and identity across every generated file;
- link-check machine files and digests after deploy;
- keep full-corpus and MCP output optional unless target clients use them.
Verify ReadMe’s generated SEO and agent surfaces
ReadMe may provide server-rendered pages, canonical metadata, Markdown alternates, content negotiation, and generated LLM surfaces depending on the project and version. Do not assume it generated a sitemap, complete descriptions, clean Markdown, or correct schema because another ReadMe site did. For each project:- inspect every expected discovery endpoint;
- verify platform SEO settings and custom head/schema support;
- read sample
.mdoutput from every component-heavy template; - check whether generated indexes describe every link;
- test preview/custom-domain and deploy behavior;
- escalate platform limitations only after confirming the issue in the production response.
Generate custom documentation surfaces from one content graph
A custom Next.js, Docusaurus, Astro, or similar site can meet the same invariants. Prefer generation from one content graph so navigation, sitemap, canonicals, Markdown, LLM indexes, and redirects cannot silently drift apart.Run copyable checks against the production documentation site
Run these against the public origin after deployment. Replace the two variables once; the remaining commands use the same host and representative page.- no DNS answer means stop; every canonical and machine link on that host is dead;
200plus an HTML document at a Markdown or changelog URL is a soft failure, not a pass;- different HTML and Markdown facts fail parity even when both responses return
200; - fewer described links than total links means the routing index is incomplete;
- raw component imports or tags mean the machine representation leaked implementation syntax.
Block documentation deployment when a technical discovery gate fails
Fail production promotion when an applicable blocker fails:- DNS/TLS and canonical host consistency;
- intended status, redirect, and
noindexbehavior; - sitemap parse, URL status, canonical, and meaningful
lastmodrules; - unique titles/descriptions and one article H1;
- broken internal links and image references;
- schema parse and visible-content consistency;
- HTML/Markdown factual parity and raw-component leakage;
- every
llms.txt, card, catalog, contract, skill, MCP, and digest link; - OpenAPI/AsyncAPI validation and current example tests;
- locale alternate reciprocity;
- accessibility and performance regression budgets;
- secret/private-content scans.