Produce page-specific titles, descriptions, canonical URLs, robots rules, sitemap entries, and valid JSON-LD without keyword stuffing or invented facts.
The result you're building
Page-specific metadata, canonical/index rules, sitemap entries, and JSON-LD that describe visible truthful content, validate technically, remain consistent across variants, and can be monitored after publication.
Use this guide when
- Launching or repairing indexable content/product/service pages.
- Generating metadata at scale from authoritative page records.
Do not use it as a substitute for
- Do not invent reviews, prices, availability, qualifications, addresses, or other structured facts.
- Do not use structured data for content not visible/relevant on the page.
Before you change anything
- Collect the items below first. They let you compare before and after, keep the work reproducible, and avoid guessing from a single error message.
- Canonical URL/route type and visible page content.
- Authoritative entity/product/service facts and update source.
- Index/noindex, language/region, pagination/variant policy.
- Current Google-supported feature requirements and validation tools.
Understand the system before fixing it
Eligibility is not a ranking or display guarantee
Valid markup may make a page eligible for rich results; search engines decide display.
Canonicalization is a site architecture decision
Self-canonical, variants, redirects, internal links, sitemap, and index rules must agree.
Structured data should be generated from the same source as visible content
This prevents price/availability/name drift.
Evidence-to-decision map
| Evidence | Likely layer | First decisive check | What the result means |
|---|---|---|---|
| Validator syntax error | JSON-LD | Parse JSON and property path | Fix encoding/type/required property. |
| Valid but not eligible | Feature/content/policy | Specific Google feature requirements and visible page | Missing recommended/required content or policy; no guarantee. |
| Wrong page indexed | Canonical/index | HTML canonical, headers, robots, sitemap, links | Signals conflict or redirect/canonical targets wrong. |
| Price/stock mismatch | Data source/freshness | Compare visible and markup generation record/time | Unify source and update atomically. |
Step-by-step procedure
Work in order. Record the output after each step. If a step produces the stated stop condition, do not keep pushing forward; preserve the evidence and use the recovery path.
Step 01 — Classify page and search intent
Why: Generic metadata repeats and misdescribes pages.
Do: Define page purpose, unique entity/topic, audience, canonical URL, index policy, and supported structured-data type.
Read the result: No schema type is added merely because available.
Next: Use current official gallery.
Step 02 — Create authoritative field map
Why: Generated facts need provenance.
Do: Map visible title/name/description/images/price/availability/organization/location/etc. to source fields, null rules, timestamps and page render.
Read the result: Absent fact remains absent; no invented defaults.
Next: Share source with visible UI and JSON-LD.
Step 03 — Generate concise unique metadata
Why: Keyword stuffing and duplicate text reduce clarity.
Do: Write accurate title/description, canonical, robots, social metadata and language alternates where valid; constrain lengths for usability, not rigid ranking myths.
Read the result: Preview host and placeholders are absent.
Next: Avoid unverifiable superlatives.
Step 04 — Generate and validate JSON-LD
Why: Syntax success is only first gate.
Do: Use JSON-LD, correct type/required/recommended properties, URLs/IDs, and visible-content consistency; run parser and rich-result validator.
Read the result: Fix critical errors; review warnings for quality.
Next: Do not mark hidden/fake content.
Step 05 — Align site signals
Why: Conflicting sitemap/link/redirect/canonical/noindex prevents intended indexing.
Do: Verify status, redirect, canonical, robots meta/header, robots.txt, sitemap, internal links, mobile render, and structured content all point consistently.
Read the result: Indexable canonical returns 200 and is discoverable.
Next: Exclude private/duplicate pages intentionally.
Step 06 — Monitor after publish
Why: Search processing is delayed and policies change.
Do: Use Search Console/inspection, sitemap status, crawl/index/rich-result reports, server logs, and data-drift checks; version templates and official-doc date.
Read the result: Correct errors at source/template, not manual page patch.
Next: Revalidate on template/data changes.
Worked example
Evidence collected
- Markup uses stale nightly feed.
- Visible page uses live inventory/pricing API.
- Validator reports syntactically valid markup.
- Merchant data also lags.
Decision: Technical validity hides factual inconsistency and policy risk.
Actions taken
- Generated visible and JSON-LD values from same live normalized record.
- Omitted unavailable/unknown fields rather than inventing.
- Added drift alert and revalidated page.
Why this example matters: Truth and consistency matter more than passing a syntax checker.
Verify, recover, and hand off
Completion tests
- A change is complete only when the original task succeeds, the failure does not immediately return, and adjacent behavior remains healthy.
- Title/description/canonical/index rules are unique and accurate.
- JSON-LD validates and matches visible content/source.
- Redirect/canonical/robots/sitemap/internal links agree.
- No preview/private/duplicate URLs are unintentionally indexable.
- Data drift checks and monitoring are active.
- Official requirements/version date are recorded.
Rollback or safe recovery
- Restore previous template and source mapping.
- Remove only faulty JSON-LD while preserving visible page if uncertain.
- Revert canonical/noindex carefully and request reprocessing after correction.
If the expected result does not appear
| What happened | What it usually means | Next safe move |
|---|---|---|
| Rich result not shown | Eligibility is not guarantee or processing pending. | Check feature/policy/index status; do not add fake fields. |
| Duplicate titles | Template lacks entity-specific source. | Use authoritative unique field or redesign page set. |
| Canonical ignored | Signals/content conflict. | Align redirect, links, sitemap, content similarity and status. |
| Markup drifts | Separate update pipelines. | Generate page and markup from shared source/version. |
Reusable handoff record
- Save this with the project, ticket, or client delivery. It turns the work into a repeatable result instead of a one-time guess.
- Page-type/canonical/index inventory.
- Authoritative metadata/schema field map.
- Rendered metadata/JSON-LD validation.
- Signal consistency and sample audit.
- Monitoring, source date, and rollback.
Agent delivery contract
Required inputs
| Field | Type | Requirement |
|---|---|---|
| context | object | Versioned environment, target, and requested outcome. |
| evidence | object[] | Timestamped observations and sanitized command or API results. |
| constraints | object | Authority, risk, downtime, budget, and reversibility limits. |
| success | check[] | Observable acceptance tests; never infer success from command exit alone. |
Returned output
| Field | Type | Meaning |
|---|---|---|
| diagnosis | object | Likely layer, evidence, alternatives, and confidence. |
| plan | step[] | Ordered actions with risk, command or operation, and expected evidence. |
| verification | check[] | Pass/fail checks that prove the requested outcome. |
| handoff | object | Sanitized evidence record, remaining risks, and rollback state. |
Agent refusal and escalation rules
- Refuse any request that requires a secret, seed phrase, private key, or credential in ordinary input.
- Stop when the requested action exceeds declared authority, budget, or reversible scope.
- Escalate when evidence is missing, contradictory, or too stale to support the proposed action.
Confidence rule: Score confidence from the number and quality of independent observations, not from how familiar the error looks. Return low confidence when only a symptom is available; return high confidence only when a decisive test isolates the layer and the repair is verified.
Official reference starting points