multi-layer-seo-governance
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.
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: multi-layer-seo-governancedescription: "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: developmentrisk: safesource: selfsource_type: selflicense: MITlicense_source: "https://github.com/rider159159/multi-layer-seo-governance/blob/137cec9fb14769786b713066e773b25fcc8434bd/LICENSE"date_added: "2026-12-02"author: rider159159tags: [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
seoorseo-technicalfor broad single-site technical SEO checklists (Core Web Vitals, schema markup, content/GEO). - Use
frontend-seoornextjs-seo-indexingfor framework-specific metadata builders or Next.js App Router indexing setup. - Use
seo-driftfor baseline-over-time regression snapshots, orseo-forensic-incident-responsefor post-crash penalty/algorithm-update incident playbooks. - Use
multi-layer-seo-governancewhen 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, orseo-technicalinstead.
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-onlyGET/HEADrequests). - 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
localhostor 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—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:
- 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. - Enforce the Canonical ↔ Redirect Invariant:
- Every URL declared in
rel="canonical"(HTML or HTTPLinkheader) must return HTTP200directly and declare itself as canonical. Emit only one canonical source per page (never duplicate<link rel="canonical">or conflicting HTML vs. HTTPLinkcanonicals). - 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.%2Cand query-parameter order). - Permanent canonicalization redirects (
301or308) 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).
- Every URL declared in
- Sync all 9 coupled surfaces:
- Canonical builder (plus
og:url, JSON-LDurl, andrel="next"if kept for non-Google crawlers) -
edge(CDN/Nginx) andferedirect middleware (single owner; log sunset condition if temporary overlap exists) - Internal
<a href>links (SPA client transitions bypassedgeredirects) - Persisted client URLs (
localStoragebrowsing 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.txtpath rules (update allow/disallow patterns when routes move) - Analytics, monitoring, and E2E test URLs
- Canonical builder (plus
3. Guard Cross-Layer Crawlability, Caching & Status Discipline
robots.txt(edge) vs.noindex(fe): Blocking a URL inrobots.txtprevents crawlers from fetching<meta name="robots" content="noindex">. To de-index, allow crawling and servenoindex(or HTTPX-Robots-Tag: noindex).- Blocked rendering assets (
edgevs.fe): Confirmrobots.txtand 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
429throttling (edge): Verify bot protection does not serve200JS-challenge or honeypot shells to verified crawlers, and coordinate crawl-rate allowlists so verified bots do not hit429. - CDN error caching &
Vary(edgevs.fe): Never cache5xxresponses or degraded empty SSR shells at the edge; verifyVaryheaders when responses differ by device or locale. - User-input queries (
bevs.fe): Whenbeinjects user-entered search terms into<title>or<h1>, define explicitnoindex/ canonical rules so arbitrary query combinations do not return200+ self-canonical. - Release safety & HTTP status mapping:
- Inspect
<meta name="robots">,<meta name="googlebot">, and HTTPX-Robots-Tagfor bothnoindexandnone(parse comma-delimited directives somax-image-preview:noneis never misread asnone). Confirm production never inherits stagingnoindexflags. - Confirmed missing / invalid requests (
400,404,410): Return404(or410if permanently removed) with anoindex, followempty state that does not inherit homepageog:url, descriptions, orOrganization/WebSiteJSON-LD. Pair400 -> 404mapping 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 genuine401,403, or429status and its applicable response headers (WWW-Authenticate,Retry-After, rate-limit headers, etc.)—do not mask visitor-facing responses as503or404. - SSR service's own upstream credential or dependency failures on a valid caller request (
408,5xx, timeout, or internal service-to-service401/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 hit429, return short-term503+Retry-After(withCache-Control: no-store) and disable SSR retry storms. Never blanket-map all backend4xxto404(which tells crawlers valid pages no longer exist), and alert on internal401/403as config/infra incidents. Never return200on error UIs (soft-404).
- Inspect
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\u003cin inline<script type="application/ld+json">; omit missing fields instead of serializing"null","undefined","Invalid Date", or futuredateModified; 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; scopedata-nosnippetselectively 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):
# 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:
- Permanent redirects (
301/308) land directly on the canonical200URL in one hop. - HTML
<link rel="canonical">(scoped to<head>) and any HTTPLinkcanonical header do not duplicate or contradict each other. - Non-200 pages (
404/503) return the expected status,noindexwithout homepage metadata leakage on404, andRetry-Afteron503. - 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 end-to-end (4-stage triage + 4-gate pre-delivery check).
Examples
Example 1 — External SEO audit triage across layers
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)
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)
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
unlocatedand 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://localhostby default. Never run automated loops against production domains, and never spoofGooglebot/BingbotUser-Agents against non-local hosts (WAFs verify reverse DNS and may return403or 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(includes companion zero-dependencyscripts/check-seo-url.mjsandscripts/check-seo-url.test.mjsunder MIT license). - Primary references: Google Search Central — Canonicalization, HTTP Status Codes & Network Errors, and Robots Meta Tag & X-Robots-Tag.
- Related catalog skills:
seo-technical,seo-drift,seo-forensic-incident-response,nextjs-seo-indexing, andfrontend-seo.