منبع حقیقت، محتوا، انتشار و رسانه · فصل ۲ — Page/Version/Block، Forms، SEO و Rollback · 160
SEO Records, Redirect Hygiene, and Canonicalization
Design an auditable SEO route record that binds each public route/version to canonical intent, redirect semantics, sitemap/indexability signals and conflict checks; detect loops, chains, broken targets and canonical mismatches without treating a declared canonical as guaranteed search-engine selection. میتواند «SEO Records, Redirect Hygiene و Canonicalization» را در یک pipeline محدود با provenance، rights/version و publication gate تعریف کند.
Lesson summary
Design an auditable SEO route record that binds each public route/version to canonical intent, redirect semantics, sitemap/indexability signals and conflict checks; detect loops, chains, broken targets and canonical mismatches without treating a declared canonical as guaranteed search-engine selection.
میتواند «SEO Records, Redirect Hygiene و Canonicalization» را در یک pipeline محدود با provenance، rights/version و publication gate تعریف کند.
This lesson produces
میتواند «SEO Records, Redirect Hygiene و Canonicalization» را در یک pipeline محدود با provenance، rights/version و publication gate تعریف کند.
Who it is for
Foundation
Use a guided lesson-specific evidence matrix and one worked negative case.
Repair
Re-run only the failed owned dimension with a smaller deterministic synthetic fixture.
Experienced
Start from mixed authority/policy/evidence records; require explicit trade-offs and provenance.
Prerequisites
1. Do not manage SEO as unrelated strings
When redirects, canonicals, sitemaps, robots directives, and hreflang references live in separate tools, contradictions are easy to miss. This lesson audits a versioned SEO Route Record that brings the decisive signals for one public route into one evidence boundary.
2. CON-009 ownership boundary
CON-009 owns the route-level SEO record and audit. CON-006 generates locale routes, CON-007 owns page/workspace versions, CON-008 owns forms, and CON-010 owns rollback and continuous route monitoring. This lesson does not absorb those outcomes.
3. Canonical is a preference, not guaranteed search-engine selection
RFC 6596 defines the canonical relation as a preferred IRI for duplicate or superset content. Google also describes canonicalization as using multiple signals and may select a different canonical from the one you prefer. Record canonical_intent; do not present a preferred canonical as proof of the URL a search engine selected.
4. The canonical target must exist
If /courses/main accidentally declares /course/main as canonical and that target does not exist, the presence of a tag is not success. canonical_target_exists=false must close the clean path and produce BLOCK_REPAIR.
5. Separate redirect class from canonical intent
A redirect controls request transport; canonical intent expresses preferred content identity. A campaign can temporarily use a 307 to another route while the long-term canonical intent remains the source after the campaign. Do not collapse those two ideas into one field.
6. Why 307 and 308 matter
RFC 9110 defines 307 as temporary and 308 as permanent, and both preserve the request method during automatic redirection. Those are HTTP semantics. The correct migration choice still depends on the intent recorded for the route.
7. Treat redirects as a graph
With A → B → C, validating each hop independently is not enough. Long chains add crawl cost and hide the final destination. In this lesson's bounded contract, a clean migration points directly to the intended final target; chain_length > 1 requires repair.
8. Redirect loops fail closed
A → B → A, or any larger cycle, is not a healthy route even if every node exists. redirect_loop=true is an independent failure and cannot be compensated for by a valid canonical annotation.
9. Keep target existence typed
Do not merge true, false, and unknown. If a redirect target has not been probed, preserve UNKNOWN rather than converting missing evidence into success. The decision remains restricted until the probe exists.
10. Align sitemap and indexability intent
A permanently redirected source that remains listed as an indexable sitemap URL sends contradictory intent. For a canonical indexable route, sitemap membership can reinforce preference; for a permanently moved source, leaving it in the sitemap conflicts with the migration record.
11. Robots/noindex is not canonicalization
Canonical preference and indexability are separate dimensions. Store both indexability and robots_state. A record with indexable=true plus NOINDEX is a SIGNAL_CONFLICT; a canonical annotation does not erase that contradiction.
12. Locale and hreflang are consumed references
This lesson does not generate the locale set. It consumes existing locale and hreflang_ref evidence. If locale variants point at contradictory canonical targets, surface the conflict rather than choosing one by timestamp.
13. Negative example: apparently green migration
Suppose /old-course redirects with 308 to /courses/main, but the new page has a mistyped canonical, the sitemap contains both URLs, and one locale route uses two hops. “The redirect works” closes none of those failures; the audit evaluates target, chain, and signal alignment separately.
14. Transfer: permanent, temporary, and localized duplicate
Change three routes: one permanent move, one temporary campaign redirect, and one localized duplicate. Rebuild redirect class, canonical intent, sitemap/indexability, and target evidence for each. Do not reinterpret temporary transport as permanent canonical intent.
15. Auditable output
SEO Route Record & Redirect Canonical Audit v1 records Route/Version/Locale, HTTP Status, Redirect Target/Class, Method Preservation, Canonical Intent/Target, Indexability, Robots, Sitemap, Hreflang Ref, Chain Length, Loop, Target Evidence, Signal Conflict, Decision, Reason, and Provenance. SEO_ROUTE_CLEAN is bounded to that exact fixture and evidence.
Assessment
There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.
AF1 formative
Name the CON-009 owned boundary and one adjacent non-goal.
AF2 formative
Why is a working redirect insufficient to prove route-level SEO hygiene?
AS1 application
Build SEO Route Record & Redirect Canonical Audit v1 from the supplied migration fixture.
AS2 diagnosis
Diagnose a direct redirect whose canonical target does not exist.
AS3 decision
Issue a bounded SEO route decision and preserve any UNKNOWN target state.
AS4 transfer
Rebuild records for a permanent move, a temporary campaign redirect, and a localized duplicate.
AS5 reflection
State the strongest claim supported by the route audit and one claim it does not prove about search-engine canonical selection.
Assessment rubric
Critical dimensions: exact route/version identity; redirect class/status semantics; canonical intent and target existence; chain/loop detection; sitemap/robots/indexability alignment; locale reference; typed UNKNOWN; bounded decision and transfer. A submission fails if it treats one redirect or canonical annotation as complete SEO proof, hides a broken/unknown target, or claims guaranteed search-engine canonical selection.
References & freshness
Case studies
Lab files
Inspect the eight synthetic route-record fixtures. Implement evaluate() in starter.py using only the supplied route evidence. Keep redirect semantics, canonical intent, target existence, chain/loop state, sitemap/indexability, and locale references separate. Adjacent form health is deliberately present in one fixture but is outside this lesson's owned decision.