Pathrule

Technical SEO and Structured Data

Pathrule2 Rules • 2 Memories

Search visibility fails when crawlers discover duplicate URLs, receive blocked or empty rendering, follow contradictory canonical and redirect signals, or parse structured data that does not match visible page content. This pattern constrains indexable responses and canonical identity while recording metadata and structured-data ownership across templates and generated pages. It complements Next.js, Astro, and Core Web Vitals patterns without depending on a framework; the focus is what a crawler and search result receive, not how the application component tree is authored.

Suggested path map

Pathrule places each piece on the matching path, so your assistant only sees it where it belongs. This is the scoping you get on import; you can adjust it in your workspace.

/ workspace root
src/
pages/
Return a complete indexable response for public pages
Metadata is owned by the route's primary entity
seo/
Emit one consistent canonical identity
Structured data mirrors visible, attributable content

Rules

2
Return a complete indexable response for public pages/src/pageshighstrictServe meaningful title, description, headings, links, and primary content without requiring a successful client-only data fetch.
1A crawler or unfurl client may not execute the application like a long-lived browser session. An indexable URL that initially returns an empty shell, generic metadata, or an error hidden behind status 200 sends weak or misleading signals.
2 
3- Render the page's unique primary content and metadata in the initial response or a crawler-accessible server-rendered path.
4- Return accurate HTTP status for missing, removed, redirected, unauthorized, and temporarily unavailable content instead of rendering every state as a successful page.
5- Keep essential navigation and discovery links as real URLs in the document; do not require pointer events or client state to reveal every crawl path.
6- Ensure robots directives, authentication gates, and bot protection do not block assets or content required to understand an intentionally public page.
7 
8See /src/seo for the adjacent decision or procedure that completes this constraint.
Emit one consistent canonical identity/src/seohighstrictAlign redirects, canonical link, internal links, sitemap entries, locale alternates, and sharing metadata on the chosen public URL.
1Canonicalization is a cluster of signals, not a single tag. If the page redirects one way, links another, and names a third canonical, crawlers must guess which URL owns the content.
2 
3- Choose policy for scheme, host, path casing, trailing slash, default locale, and removable query parameters, then generate URLs from one canonical builder.
4- Redirect permanent duplicates to the canonical URL where possible and make internal links point directly at it.
5- Include only canonical, indexable URLs in sitemaps and update modification signals from meaningful content change rather than every build.
6- Make locale alternates reciprocal and self-referential where used, and do not label machine-translated or unrelated pages as equivalent regional versions.
7 
8See /public for the adjacent decision or procedure that completes this constraint.

Memories

2
Structured data mirrors visible, attributable content/src/seoGenerate schema from the same page model the user sees and omit properties the product cannot support truthfully.
1Structured data is not a place to add keywords or claims that are absent from the page. Divergence between visible content and machine markup makes maintenance harder and can invalidate enhanced-result eligibility.
2 
3- Choose the most specific supported type that describes the page's primary entity rather than attaching several unrelated top-level entities.
4- Generate names, descriptions, authorship, dates, prices, availability, ratings, and breadcrumbs from the same authoritative data used in the rendered page.
5- Use stable absolute identifiers and URLs and keep organization or product identity consistent across pages.
6- Validate generated JSON syntax and semantic requirements on real routes, then monitor deployed pages because template-valid markup can still contain missing production data.
7 
8See /src/pages for the rule or workflow that puts this decision into practice.
Metadata is owned by the route's primary entity/src/pagesBuild title, description, sharing image, and robots policy from route data with explicit fallbacks and uniqueness checks.
1A global template cannot express every page, while arbitrary component-level mutation creates duplicate or race-prone tags. The route that resolves the primary entity has the information and lifecycle to own metadata.
2 
3- Compose a concise unique title and description from authoritative fields and fall back to a truthful section-level page, never empty strings or copied placeholder text.
4- Use one metadata owner so nested components cannot emit competing canonical, robots, or social tags.
5- Keep social image, title, description, and canonical URL aligned with the page users reach when the preview is opened.
6- Exclude search, filter, preview, error, and private states from indexing according to product policy instead of letting generic metadata make them look canonical.
7 
8See /src/seo for the rule or workflow that puts this decision into practice.

Why this pattern

AI agents often add a canonical tag to the wrong URL, emit noindex and a sitemap entry together, generate schema markup unrelated to visible content, or hide essential text behind client-only rendering.

Built for Web teams operating public documentation, product, editorial, marketplace, or landing pages.

Keeps your assistant from:

  • Splitting ranking signals across duplicate parameterized URLs
  • Publishing indexable error or empty pages
  • Contradicting robots, canonical, redirect, and sitemap signals
  • Claiming structured data the page does not visibly support
License
Apache-2.0
Version
1.0.0
Updated
2026-08-25
View source