SEO
Every page is complete HTML generated at build time, with canonical, hreflang, Open Graph, and structured data; the sitemap, robots.txt, and redirects are generated automatically.
Static HTML
At build time ButterIX uses React server rendering to output complete HTML for every page, without relying on client-side JavaScript to render content. Search engine crawlers, social link previews, and AI crawlers get everything readers see — body text, code examples, and API parameter tables included.
Navigation between pages happens without a full reload via a tiny client script, and links are prefetched with Speculation Rules, but that's only an experience enhancement: with JavaScript disabled, the site is still fully browsable.
The head of every page
Taking this page as an example, the builder outputs:
<title>SEO · ButterIX</title>
<meta name="description" content="SEO in ButterIX — static HTML, title templates and meta…">
<link rel="canonical" href="https://acme-payments-sites.butterix.com/guides/features/seo">
<link rel="alternate" hreflang="zh" href="https://acme-payments-sites.butterix.com/guides/features/seo">
<link rel="alternate" hreflang="x-default" href="https://acme-payments-sites.butterix.com/guides/features/seo">
<link rel="alternate" hreflang="en" href="https://acme-payments-sites.butterix.com/en/guides/features/seo">
<link rel="alternate" type="text/markdown" href="/guides/features/seo.md" title="Markdown">
<meta property="og:type" content="article">
<meta property="og:site_name" content="ButterIX">
<meta property="og:title" content="SEO · ButterIX">
<meta property="og:url" content="https://acme-payments-sites.butterix.com/guides/features/seo">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@bitidocs">
<script type="application/ld+json">{"@type":"TechArticle", …}</script>
<script type="application/ld+json">{"@type":"BreadcrumbList", …}</script>| Output | Source |
|---|---|
<title> | seo.title-template (default {page} | {site}); the page title can be overridden with frontmatter og:title |
| description | frontmatter description → og:description → subtitle → body excerpt |
| keywords | frontmatter keywords |
og:image | frontmatter og:image → seo.og-image; with an image, the Twitter card automatically becomes summary_large_image |
article:modified_time | frontmatter last-updated |
robots | noindex, nofollow is output for page noindex, noindex in the navigation, seo.noindex, or preview deployments |
See Page metadata and docs.yml › SEO for field details.
canonical
- Defaults to the page's own absolute URL, on the site's primary domain.
- Older version pages point canonical to the same page in the default version, so similar content across versions doesn't compete for ranking. See Versions.
- Set it manually with frontmatter
canonical-url.
Structured data
Every page outputs two JSON-LD blocks:
TechArticle: title, description, URL, language (inLanguage),dateModified(whenlast-updatedis set), and the parentWebSite.BreadcrumbList: generated from the section path in the navigation, matching the breadcrumbs on the page.
sitemap.xml
/sitemap.xml contains every page (all languages and versions, except noindex pages and changelog date detail pages), and each URL carries xhtml:link entries for its other language versions:
<url>
<loc>https://acme-payments-sites.butterix.com/guides/features/seo</loc>
<xhtml:link rel="alternate" hreflang="zh" href="https://acme-payments-sites.butterix.com/guides/features/seo"/>
<xhtml:link rel="alternate" hreflang="en" href="https://acme-payments-sites.butterix.com/en/guides/features/seo"/>
</url>robots.txt and AI crawlers
The default robots.txt allows all crawlers and declares the sitemap:
User-agent: *
Allow: /
Sitemap: https://acme-payments-sites.butterix.com/sitemap.xmlDeclare content use
seo.content-signal outputs Content-Signal in robots.txt, saying what your content may be used for. All three are optional booleans; ones you leave out aren't output:
seo:
content-signal:
search: true # building a search index
ai-input: true # input for AI answers
ai-train: false # training modelsUser-agent: *
Content-Signal: search=yes, ai-input=yes, ai-train=no
Allow: /Block AI crawlers
With seo.ai-crawlers: disallow, the following AI training and retrieval crawlers are additionally blocked:
- GPTBot
- ChatGPT-User
- OAI-SearchBot
- ClaudeBot
- Claude-User
- Claude-SearchBot
- anthropic-ai
- PerplexityBot
- Google-Extended
- Applebot-Extended
- CCBot
- Bytespider
- meta-externalagent
Use your own robots.txt
agents:
robots-txt: robots.txt # relative to docs.ymlThe file is published as it is; ai-crawlers and content-signal no longer apply.
With seo.noindex: true or on preview deployments, robots.txt is always Disallow: /, even with your own file.
Docs usually want to be read by AI: developers increasingly learn about an API through ChatGPT, Claude, and Cursor. ButterIX allows AI crawlers by default and provides .md and llms.txt so they read more accurately; see Agent-friendly.
Redirects
When restructuring, use redirects to keep the ranking of old links:
redirects:
- source: /docs/getting-started
destination: /guides/get-started/quickstart
- source: /api/v1/:endpoint
destination: /api-reference/:endpoint- 301 permanent redirects by default;
permanent: falsegives 302. - Redirects keep the query string;
.mdand.mdxURLs go to the Markdown of the target page. - When the home page isn't
/, the root URL automatically 302-redirects to the home page.
URL normalization
- Page URLs have no trailing slash; the runtime 308-redirects
/guides/to/guidesto avoid duplicate URLs. - Nonexistent URLs return a real 404 status code and
404.html(withnoindex); requests for Markdown get a Markdown 404.
Performance
Speed is itself a ranking factor:
- Zero hydration: pages don't need to re-render in the browser.
- Code highlighting happens at build time, and icons are combined into an in-page SVG sprite with no icon fonts loaded.
.brand.gzare precompressed at build time, and the runtime returns them directly based onAccept-Encoding.- Hashed static assets (styles, scripts, fonts) use a one-year
immutablecache; HTML is revalidated every time.
Preview deployments
Every page of a preview deployment (pull requests, editor previews, biti deploy --preview) carries noindex, robots.txt blocks crawling, and a "Preview" banner appears at the top of the page, so previews never compete with the production site for indexing.