Govern cross-layer technical SEO across edge/CDN, backend API, SSR frontend, and CMS teams with ownership maps, decision locks, status discipline, and audit triage.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Multi Layer Seo Governance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sickn33-multi-layer-seo-governance)
---
name: multi-layer-seo-governance
description: "Govern cross-layer technical SEO across edge/CDN, backend API, SSR frontend, and CMS teams with ownership maps, decision locks, status discipline, and audit triage."
category: development
risk: safe
source: self
source_type: self
license: MIT
license_source: "https://github.com/rider159159/multi-layer-seo-governance/blob/137cec9fb14769786b713066e773b25fcc8434bd/LICENSE"
date_added: "2026-12-02"
author: rider159159
tags: [seo, technical-seo, ssr, architecture, governance]
---
# Multi-Layer Technical SEO Governance
## Overview
Large, multi-team SSR websites split SEO signals across four independent layers: CDN/Gateway/Nginx (`edge`), backend APIs (`be`), SSR frontends (`fe`), and CMS/editorial data (`data`). In practice, high-impact SEO regressions rarely come from missing basic meta tags—they come from cross-layer drift: canonical↔redirect loops, blanket `4xx -> 404` status mapping during upstream auth or rate-limit errors, duplicate edge/app redirects, silent reversals of locked cross-team trade-offs, and external audit tickets misassigned to frontend teams.
This skill establishes **4-layer ownership governance, a 9-surface URL/canonical/redirect sync protocol, release status discipline, cross-team decision locks with a formal supersede workflow, and a 4-stage / 4-gate external audit triage process**.
**How this differs from related catalog skills:**
- Use `seo` or `seo-technical` for broad single-site technical SEO checklists (Core Web Vitals, schema markup, content/GEO).
- Use `frontend-seo` or `nextjs-seo-indexing` for framework-specific metadata builders or Next.js App Router indexing setup.
- Use `seo-drift` for baseline-over-time regression snapshots, or `seo-forensic-incident-response` for post-crash penalty/algorithm-update incident playbooks.
- Use **`multi-layer-seo-governance`** when a change or audit spans **two or more infrastructure/team layers** and requires ownership attribution, cross-team handoffs, decision locks, and raw HTTP/SSR verification.
**Precedence:** If the target repository already maintains its own project-specific SEO skill or ownership map, treat the project's local rules as authoritative and apply this skill only to fill cross-layer governance gaps.
## When to Use
- Use when a planned URL, trailing-slash, query-parameter, canonical, redirect, `robots.txt`, `X-Robots-Tag`, or SSR HTTP status change spans two or more layers (`edge`, `be`, `fe`, `data`).
- Use when migrating routes between a legacy host and a new SSR application (Strangler-Fig / micro-frontend coexistence).
- Use when triaging an external SEO audit report or cross-department ticket before opening issues or editing frontend code.
- Use when an unusual SEO behavior appears in code and may be a locked cross-team trade-off (e.g., WAF/bot-protection Referer constraints or custom product specs).
- Do not use for standalone copywriting, keyword research, or single-layer meta tag authoring; use `seo`, `seo-fundamentals`, or `seo-technical` instead.
## Prerequisites
- Local read access to the repository under review (and any project ownership map or ADR docs, if present).
- For raw HTTP/SSR verification against a local dev server or explicitly allowlisted staging host: `curl` (standard CLI, read-only `GET`/`HEAD` requests).
- No external paid APIs, SaaS accounts, or credentials are required by default. Staging environments protected by bot/captcha gates require a team-provided staging bypass header supplied via environment variables (never committed or echoed).
- Network calls are read-only and strictly opt-in against `localhost` or user-confirmed staging hosts. Do not run automated crawls against production domains.
## How It Works
### 1. Establish 4-Layer Ownership Before Editing
Use one consistent 4-layer taxonomy across ownership maps, PR descriptions, and audit reports:
| Layer | Typical Responsibilities | Common Cross-Layer Risks |
| --- | --- | --- |
| `edge` | CDN caching/`Vary`, Gateway/Ingress/Nginx routing (including legacy coexistence), HTTPS & trailing-slash 301s, `Link` canonical headers, `X-Robots-Tag`, `robots.txt`, XML sitemaps, WAF/rate limits | Missing route prefix routes new pages to legacy 404; wildcard prefix shadows `/sitemap/*`; edge + app duplicate 301s; edge `Link` header conflicts with SSR HTML canonical |
| `be` | Listing/search dynamic meta & JSON-LD, API-generated URLs, query validation status codes | Frontend edits drift from API URL shape or get overwritten by API payloads |
| `fe` | Detail-page canonicals, JSON-LD, SSR HTTP status mapping, H1, internal link formatting, snippet/thumbnail controls | Client-only patches invisible to crawlers; SPA links bypass edge redirects |
| `data` | CMS/backstage title & description templates, variable placeholders, entity images/copy | Missing content misfiled as code bugs; unreplaced `${Var}` placeholders leak to HTML |
Check the repository's existing ownership map before editing. **If none exists, note it in the summary and ask whether to create one from [references/ownership-map.template.md](references/ownership-map.template.md)—do not generate unsolicited repo docs during a small fix.**
**Cross-layer patching rule:**
- **Default:** If a signal originates in another layer or repository, write a **cross-team handoff specification** instead of patching the wrong layer.
- **Exception (active SEO damage):** A temporary workaround in the current layer is allowed **only** with an inline comment and an entry in the ownership map's **Temporary Patches** table recording: (1) the permanent owning layer, (2) the handoff ticket, and (3) the exact removal condition.
### 2. Enforce URL, Canonical, Redirect & Migration Integrity
Run this checklist before changing any URL shape, trailing-slash rule, query-parameter rule, or migration route:
1. **Check live index reality first:** Confirm what search engines currently index (Search Console or `site:` sampling) before picking a target canonical format, avoiding unnecessary mass re-consolidation when a stable format is already indexed.
2. **Enforce the Canonical ↔ Redirect Invariant:**
- Every URL declared in `rel="canonical"` (HTML or HTTP `Link` header) **must return HTTP `200` directly** and declare itself as canonical. Emit only **one** canonical source per page (never duplicate `<link rel="canonical">` or conflicting HTML vs. HTTP `Link` canonicals).
- Never let canonical strip parameters (e.g., default sort/page) while redirect middleware adds them back, creating a canonical↔redirect loop.
- Keep canonical signals **verbatim-consistent after URL normalization** (preserving `,` vs. `%2C` and query-parameter order).
- Permanent canonicalization redirects (`301` or `308`) must resolve in **one hop directly to the canonical URL**—never land on a non-canonical URL that points elsewhere. During migrations, map removed URLs 1:1 to equivalent targets rather than bulk-redirecting unrelated pages to the homepage (soft-404).
3. **Sync all 9 coupled surfaces:**
- [ ] Canonical builder (plus `og:url`, JSON-LD `url`, and `rel="next"` if kept for non-Google crawlers)
- [ ] `edge` (CDN/Nginx) and `fe` redirect middleware (single owner; log sunset condition if temporary overlap exists)
- [ ] Internal `<a href>` links (SPA client transitions bypass `edge` redirects)
- [ ] Persisted client URLs (`localStorage` browsing history/bookmarks—reconstruct from entity IDs)
- [ ] `be`-generated URLs (APIs, recommendations, notifications)
- [ ] XML sitemaps (keep sitemap URLs canonical to avoid wasted 301 hops)
- [ ] Gateway / ingress route prefixes (verify wildcard prefixes like `(/.*)?` do not shadow legacy paths or static files)
- [ ] `robots.txt` path rules (update allow/disallow patterns when routes move)
- [ ] Analytics, monitoring, and E2E test URLs
### 3. Guard Cross-Layer Crawlability, Caching & Status Discipline
- **`robots.txt` (`edge`) vs. `noindex` (`fe`):** Blocking a URL in `robots.txt` prevents crawlers from fetching `<meta name="robots" content="noindex">`. To de-index, allow crawling and serve `noindex` (or HTTP `X-Robots-Tag: noindex`).
- **Blocked rendering assets (`edge` vs. `fe`):** Confirm `robots.txt` and WAF rules do not block JS/CSS bundles (`/_next/`, `/_nuxt/`, asset CDNs) or browser-fetched APIs required to render page content.
- **WAF soft-200 & bot `429` throttling (`edge`):** Verify bot protection does not serve `200` JS-challenge or honeypot shells to verified crawlers, and coordinate crawl-rate allowlists so verified bots do not hit `429`.
- **CDN error caching & `Vary` (`edge` vs. `fe`):** Never cache `5xx` responses or degraded empty SSR shells at the edge; verify `Vary` headers when responses differ by device or locale.
- **User-input queries (`be` vs. `fe`):** When `be` injects user-entered search terms into `<title>` or `<h1>`, define explicit `noindex` / canonical rules so arbitrary query combinations do not return `200` + self-canonical.
- **Release safety & HTTP status mapping:**
- Inspect `<meta name="robots">`, `<meta name="googlebot">`, and HTTP `X-Robots-Tag` for both `noindex` and `none` (parse comma-delimited directives so `max-image-preview:none` is never misread as `none`). Confirm production never inherits staging `noindex` flags.
- **Confirmed missing / invalid requests (`400`, `404`, `410`):** Return **`404`** (or `410` if permanently removed) with a `noindex, follow` empty state that does **not** inherit homepage `og:url`, descriptions, or `Organization`/`WebSite` JSON-LD. Pair `400 -> 404` mapping with post-release 404-rate monitoring.
- **Genuine visitor-facing authentication, authorization, or per-client rate limits (`401`, `403`, `429`):** When the *visitor/caller* lacks credentials, lacks permission for a restricted resource, or triggers per-client rate limiting, **preserve the genuine `401`, `403`, or `429` status and its applicable response headers** (`WWW-Authenticate`, `Retry-After`, rate-limit headers, etc.)—do not mask visitor-facing responses as `503` or `404`.
- **SSR service's own upstream credential or dependency failures on a valid caller request (`408`, `5xx`, timeout, or internal service-to-service `401`/`403`/`429`):** When the caller's request is valid (e.g., an indexable public page) but the SSR service's own backend credentials expired (`401`/`403`), internal WAF/auth blocked the SSR service, or shared SSR-to-API quotas hit `429`, return short-term **`503` + `Retry-After`** (with `Cache-Control: no-store`) and disable SSR retry storms. Never blanket-map all backend `4xx` to `404` (which tells crawlers valid pages no longer exist), and alert on internal `401`/`403` as config/infra incidents. Never return `200` on error UIs (soft-404).
### 4. Respect Decision Locks, Provenance & Structured Data Hygiene
- **Check existing locks first:** Read inline comments, ADRs, and the ownership map before modifying unusual SEO behavior. Never silently revert a locked cross-team trade-off back to generic SEO advice.
- **Formal supersede workflow:** Before changing a locked decision, share the prior rationale with the requester **and** confirm with the existing owner. Update the Decision Lock table linking to the superseded entry rather than erasing history. If a decision flips twice in a short period, pause implementation and ask stakeholders for one finalized spec.
- **Commit & PR provenance:** Record who requested each SEO change and on what basis (ticket ID, search-engine doc, audit finding, or live index check).
- **Structured data & snippets:** Escape `<` as `\u003c` in inline `<script type="application/ld+json">`; omit missing fields instead of serializing `"null"`, `"undefined"`, `"Invalid Date"`, or future `dateModified`; output `<meta name="robots" content="max-image-preview:none">` on indexable detail pages that lack entity-owned images but render related cards with other entities' logos; scope `data-nosnippet` selectively so support/contact pages are not suppressed; guard CMS `${Var}` placeholders from rendering verbatim.
### 5. Verify at the Raw HTTP/SSR Layer & Triage External Audits
Browser DevTools show hydrated client DOM and hide redirect chains, HTTP `Link` / `X-Robots-Tag` headers, status codes, and SSR vs. CSR gaps. Always inspect raw HTTP responses against `localhost` (or a user-confirmed staging host):
```bash
# Inspect one hop only (does not follow a redirect chain): status code, Location, Link, X-Robots-Tag, and Retry-After headers on localhost
curl -sS -D - -o /dev/null http://localhost:3000/products/12345
# Inspect raw SSR <head> signals (canonical, robots, title) without browser hydration
curl -sS http://localhost:3000/products/12345/ | grep -iE '<title|rel="canonical"|name="robots"|name="googlebot"'
```
Verify:
1. Permanent redirects (`301`/`308`) land directly on the canonical `200` URL in one hop.
2. HTML `<link rel="canonical">` (scoped to `<head>`) and any HTTP `Link` canonical header do not duplicate or contradict each other.
3. Non-200 pages (`404` / `503`) return the expected status, `noindex` without homepage metadata leakage on `404`, and `Retry-After` on `503`.
4. All cited code paths are verified via direct file read (`file:line @ commit`) before delivery.
For external audit reports or organic traffic investigations, load and follow [references/audit-triage.md](references/audit-triage.md) end-to-end (4-stage triage + 4-gate pre-delivery check).
## Examples
### Example 1 — External SEO audit triage across layers
```text
User request: We received an external SEO audit flagging 404s on /products/98765, missing trailing slashes on internal links, and a request to remove max-image-preview:none on detail pages. Triage before opening tickets.
Inputs: Repository codebase, docs/seo-ownership.md (optional), and local dev server at http://localhost:3000
Expected result (illustrative):
- Confirmed scope: stratified sample (1 data-rich detail URL, 1 data-sparse detail URL, 1 invalid ID).
- Finding 1 [High] — Owner: fe — Confirmed: SSR internal service-to-service 429/403 dependency failures on valid public pages were blanket-mapped to HTTP 404 in server/routes/products.ts:88 @ <sha>. Recommended action: map confirmed missing/invalid requests (400/404/410) to 404 + noindex, preserve genuine visitor 401/403/429 with their headers, and map SSR internal upstream auth/rate-limit/5xx failures on valid public requests to 503 + Retry-After.
- Finding 2 [Medium] — Owner: fe + be (Cross-Team Handoff) — Confirmed: Edge 301 adds trailing slash, but SPA <a href> and backend recommendation API URLs omit it, causing avoidable hops. Sync across the 9 coupled surfaces.
- Finding 3 [Locked Decision] — Do not revert: max-image-preview:none is locked in docs/seo-ownership.md for entities without own logos to prevent thumbnail hijacking by related-card logos; follow the formal supersede workflow with SEO/Product owners before changing.
- Blind spots noted: Live Google indexation counts and CrUX real-user CWV require Search Console / CrUX and cannot be proved from local raw HTTP checks.
```
### Example 2 — Visitor-facing `401`/`403`/`429` (preserve status and headers)
```text
User request: Our SSR error handler currently rewrites every 401, 403, and 429 from the backend into HTTP 503. Fix handling for private account routes and per-visitor rate limits.
Inputs:
- Case A (unauthenticated visitor): GET /account/saved (no session cookie) -> backend returns 401 with WWW-Authenticate: Bearer realm="account"
- Case B (forbidden role): GET /admin/reports (valid non-admin session) -> backend returns 403
- Case C (per-visitor burst): GET /search?q=shoes (single client exceeds edge/API per-IP limit) -> API returns 429 with Retry-After: 60
Expected result (illustrative):
- Preserve HTTP 401 + WWW-Authenticate: Bearer realm="account" for Case A (do not rewrite to 503 or 404).
- Preserve HTTP 403 for Case B (with Cache-Control: private, no-store).
- Preserve HTTP 429 + Retry-After: 60 for Case C (do not mask client throttling as a 503 outage; coordinate separate edge allowlists only for verified search-engine bots).
```
### Example 3 — SSR service's own upstream credential or dependency failure on a valid public request (return `503`)
```text
User request: A valid public product page (/products/98765/) started returning 404 after our SSR server's internal API key expired, and intermittently returns 403/429 when the shared SSR-to-API quota spikes.
Inputs:
- Caller request: GET /products/98765/ (valid public indexable URL; requires no visitor login)
- Upstream failure: SSR server's service-to-service call to catalog API returns 401/403 (expired SSR credential / internal WAF rule) or 429 (shared SSR pool quota exhausted)
Expected result (illustrative):
- Return HTTP 503 Service Unavailable with Retry-After: 120 and Cache-Control: no-store (never 404, which would de-index valid URLs, and never forward internal S2S 401/403 as if the visitor lacked login).
- Disable automatic SSR retry loops against the failing dependency and trigger a high-priority config/infra alert for the internal 401/403 credential failure.
```
## Limitations
- Raw HTTP/SSR checks cannot measure live search-engine indexation status, crawl stats, rankings, backlinks, or real-user Core Web Vitals (those require Search Console and CrUX/RUM).
- This portable skill bundle intentionally contains only non-executable markdown protocols and templates (no bundled scripts). Teams wanting an automated zero-dependency Node.js 18+ HTTP/SSR checker with 25 regression tests can inspect the pinned upstream repository linked below.
- This skill does not inspect private CDN/WAF consoles or backend repositories outside the workspace; unverified layers must be marked `unlocated` and converted into cross-team handoffs rather than guessed.
## Safety and side effects
- **Risk level:** `safe` (read-only analysis, governance templates, and local/staging raw HTTP inspection).
- **Network & target boundaries:** Raw HTTP verification targets `http://localhost` by default. Never run automated loops against production domains, and never spoof `Googlebot`/`Bingbot` User-Agents against non-local hosts (WAFs verify reverse DNS and may return `403` or block the caller IP).
- **Secrets & staging headers:** Never commit, log, or echo staging bypass header values, cookies, or tokens. Pass staging bypass headers strictly via environment variables only to user-confirmed staging hosts.
- **Repository writes:** Do not generate new ownership-map documentation files unsolicited during small fixes; ask the user before adding new repo docs or applying temporary cross-layer workarounds.
## Sources and related skills
- **Upstream repository (pinned revision):** [rider159159/multi-layer-seo-governance @ `137cec9fb14769786b713066e773b25fcc8434bd`](https://github.com/rider159159/multi-layer-seo-governance/tree/137cec9fb14769786b713066e773b25fcc8434bd) (includes companion zero-dependency `scripts/check-seo-url.mjs` and `scripts/check-seo-url.test.mjs` under MIT license).
- **Primary references:** [Google Search Central — Canonicalization](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls), [HTTP Status Codes & Network Errors](https://developers.google.com/search/docs/crawling-indexing/http-network-errors), and [Robots Meta Tag & X-Robots-Tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag).
- **Related catalog skills:** `seo-technical`, `seo-drift`, `seo-forensic-incident-response`, `nextjs-seo-indexing`, and `frontend-seo`.