Build a documentation SEO style guide: titles/headers, code blocks rendering, versioning…
- User
Build a documentation SEO style guide: titles/headers, code blocks rendering, versioning canonical rules, and redirects.
Assistant
Build a documentation SEO style guide: titles/headers, code blocks rendering, versioning canonical rules, and redirects.
The user wants a documentation SEO style guide covering specific areas:
The goal is to provide a comprehensive, actionable, and technical guide that documentation teams (technical writers, developers) can use to ensure their docs rank well in search engines and provide a good user experience.
1. Structure of the Guide: I need to organize this logically. A good structure would be:
/v1/, /v2/, and latest. The "Self-referencing canonical" vs. "Canonical to latest" debate.2. Drafting Content - Section by Section:
Titles & Headers:
<title> tag usually mirrors it).Code Blocks:
Versioning & Canonicals (The Core Complexity):
/docs/ should usually alias to /docs/latest/ or the current stable version.robots="nofollow" or noindex on very old versions (EOL), but keep self-referencing canonicals for active legacy versions. The default version should be the one indexed highest.Redirects:
3. Refinement and Tone:
4. Self-Correction/Review during drafting:
noindex or redirecting them to the upgrade guide if the version is dead. I will distinguish between "Active LTS" and "Archived/EOL".5. Final Polish:
Let's build the output. This is a comprehensive SEO Style Guide specifically tailored for technical documentation sites. It covers the four critical pillars of Technical SEO for Docs: Content Hierarchy, Code Rendering, Version Control, and URL Management.
Search engines use headings to understand the topic of a page. For documentation, clarity and scannability are paramount.
<h1>)<h1>. Do not duplicate titles across different versions or similar topics.[Action/Subject] | [Product Name]
How to Authenticate Users | Acme APIIntroduction or Page 1<h2>, <h3>, <h4>)<h1> to <h3>.h1: Get Started with Authenticationh2: API Keysh3: Generating a Keyh3: Revoking a Keyh2: OAuth 2.0Code blocks are the most important content for developers. Improperly rendered code can confuse search engines or degrade the user experience (Core Web Vitals).
<code> and <pre> tags so crawlers can read it.app.js or TerminalDocumentation often has multiple versions (e.g., v1.0, v2.0, "Latest"). This creates duplicate content issues. You must tell search engines which version is the "master."
Ideally, you want users to find the current version of the docs, not a deprecated one.
docs.site.com/v1.0/guidedocs.site.com/v2.0/guide (Current)docs.site.com/latest/guide (Alias)<link rel="canonical" href="https://docs.site.com/v2.0/guide" /> (Self-referencing)<link rel="canonical" href="https://docs.site.com/v2.0/guide" /> (Points to current).div or banner stating "You are viewing an outdated version." Google treats these banners as part of the content quality assessment.If users must find older versions (e.g., for legacy maintenance):
v1.0 points to v1.0).<meta name="robots" content="noindex"> tag to versions older than n-2 (e.g., keep v3 and v2 indexed, hide v1).When restructuring docs, broken links (404s) destroy SEO equity.
domain.com/guide (No slash)domain.com/guide/ (With slash)| Element | Requirement |
|---|---|
| Title | Is the <h1> unique and under 60 chars? |
| Keywords | Is the main keyword in the Title, URL, and <h1>? |
| Code | Is the language defined (e.g., ```json)? Is it text, not an image? |
| Version | If documenting a legacy feature, is the "Outdated" banner visible? |
| Links | Are all hyperlinks absolute or correctly relative? No broken links? |