# Sitemap Audit — Quire Guide (https://quire.io/guide/sitemap.xml)

## Scope
- Root index: `https://quire.io/sitemap.xml` → 3 sub-sitemaps (`sitemap-main.xml`, `blog/sitemap.xml`, `guide/sitemap.xml`)
- Focus: `https://quire.io/guide/sitemap.xml`, generated by `jekyll-sitemap` (1.4.0) from the Jekyll `_docs` collection, 13 languages + English.

## Validation Results

| Check | Result |
|---|---|
| XML well-formed (`xmllint --noout`) | Pass — valid XML |
| URL count | 1,932 `<url>` entries — well under the 50,000/file limit, no index split needed |
| `priority` / `changefreq` tags | None present — correctly omitted (Google ignores both) |
| Duplicate `<loc>` entries | None found |
| Per-language URL parity | Exactly 138 URLs per language × 14 locales (en + 13) = 1,932. Slug sets are identical across all locales — no language is missing pages relative to English |
| Sample URL status (n=15, random across 8 languages) | All returned HTTP 200 (following redirects) |
| `lastmod` accuracy | See finding below — mostly bulk-build timestamps, not true content-edit dates |
| hreflang in sitemap | Not present — and not needed (see finding) |
| hreflang in page `<head>`| Present and correct set (self + all 13 alternates), but format issue (see finding) |

## Coverage Cross-Check (English source vs. live sitemap)
- `_docs/en/` contains 139 Markdown source files.
- Sitemap contains 138 English (`/guide/<slug>/`) URLs.
- The one-file gap traces to **2 new pages** (`templates-03-okrs.md` → `/guide/okrs/`, `templates-04-gtd.md` → `/guide/gtd/`) that are untracked/uncommitted in git and not yet deployed (`https://quire.io/guide/okrs/` and `/gtd/` both return live 404). This is expected pre-publish state, not a sitemap defect — flagging so it isn't forgotten before the next deploy. Once pushed and rebuilt, the sitemap should organically grow to 139 × 14 = 1,946 URLs (assuming both get translated later, or 137 stay English-only until translated).

## Findings

### 1. ~77% of the sitemap shares one identical `lastmod` timestamp (Low/Info)
1,494 of 1,932 URLs (all 13 non-English locales) carry the exact same `lastmod` of `2026-05-21T10:31:05+08:00`, and the 138 English URLs carry `2026-05-19T15:47:44+08:00`. These look like **build/deploy timestamps** applied uniformly during a bulk sync rather than genuine per-page content-edit dates. A smaller set of pages (translation-fix batches on 06-12, 06-16→06-30) show more granular, credible timestamps, suggesting the sitemap generator uses file mtime, and most files simply haven't been touched individually since the last full rebuild.
- **Why it matters**: `lastmod` is a low-weight but still-used freshness signal for recrawl prioritization. A `lastmod` that doesn't correspond to real content changes reduces Google's trust in the field and can cause it to be discounted entirely for the whole file.
- **Recommendation**: If feasible, derive `lastmod` from the actual git commit date of the underlying Markdown file (or a `last_modified_at` front-matter field) rather than the filesystem mtime set by whatever process last touched/synced the file during translation builds.

### 2. hreflang values use underscore instead of hyphen for regional codes (Medium)
Page-level hreflang tags use `pt_BR`, `zh_TW`, `zh_HK` (underscore) instead of the BCP47/spec-required `pt-BR`, `zh-TW`, `zh-HK` (hyphen). Example from `/guide/quire-custom-fields/`:
```
<link rel="alternate" hreflang="pt_BR" href="https://quire.io/guide/pt_BR/quire-custom-fields/" />
<link rel="alternate" hreflang="zh_TW" href="https://quire.io/guide/zh_TW/quire-custom-fields/" />
```
- **Why it matters**: Google's hreflang implementation expects the ISO 639-1 + ISO 3166-1 hyphenated format. Non-conforming values are typically ignored, meaning `pt_BR`, `zh_TW`, and `zh_HK` alternates may not be honored at all in Search Console / results, even though `de`, `es`, `fr`, `ja`, `ko`, `ru`, `tr`, `zh` (single-code, no region) are fine.
- **Recommendation**: Change the hreflang attribute values (not necessarily the URL paths) to use hyphens: `pt-BR`, `zh-TW`, `zh-HK`. This is a template fix in `_includes/head.html`; URLs stay as-is.

### 3. No `x-default` hreflang tag (Low)
The per-page hreflang set lists all 14 language variants but no `x-default` fallback for unmatched locales/users.
- **Recommendation**: Add `<link rel="alternate" hreflang="x-default" href="https://quire.io/guide/<slug>/">` pointing at the English version, so users browsing in unlisted languages land on a sensible default rather than Google guessing.

### 4. Sitemap correctly omits hreflang annotations — no action needed (Info)
The `guide/sitemap.xml` itself contains no `xhtml:link hreflang` annotations (no `xmlns:xhtml` namespace declared). This is fine: Google supports hreflang either via sitemap annotations **or** in-page `<link>` tags, not both. Since the in-page implementation is present and covers all locale pairs (aside from the underscore issue above), duplicating it in the sitemap would add ~14× more nodes per URL for no benefit and increase maintenance risk of the two falling out of sync. Recommend leaving hreflang entirely in-page.

### 5. Two new English pages not yet in the sitemap (Info — expected, not a defect)
`okrs` and `gtd` template pages exist as uncommitted local Markdown source but are not live and not in the sitemap yet (both 404 on quire.io). Not a sitemap bug — just confirming there's no sitemap regeneration issue once these are committed, pushed, and the site is rebuilt.

### 6. No location-page doorway risk detected (Info)
This site's programmatic content is language variants of the same help article (translation), not city/location-swapped landing pages. Quality-gate thresholds for thin/duplicate location pages do not apply here. No action needed.

## What Works
- Valid XML, no schema errors.
- URL volume (1,932) is far below the 50k-per-file ceiling; no sitemap index split required for `guide/sitemap.xml`.
- No deprecated `priority`/`changefreq` clutter.
- No duplicate URLs in the sitemap.
- Perfect 1:1 slug parity across all 14 locales — no language is missing pages that exist in another.
- Sampled URLs across 8 different locales all resolve 200.
- hreflang is implemented in-page (not needed in the sitemap) with full reciprocal linking and a self-referencing canonical on every page — the core mechanism is correctly wired, just needs the hyphen fix.
