Prompt

I’m building a tool to detect broken canonicals and redirects, what data do I need?

Technology / SEO & AEO Tools2 observationsLast seen Oct 23, 2026

Latest observation

Oct 23, 2026OpenAI APIWeb search: off

To detect broken canonicals and redirects reliably, you’ll want to collect a mix of URL-level, HTTP-level, HTML-level, and graph/state data.

1) Core URL inventory

You need a canonical list of URLs you intend to audit.

Include:

  • url
  • status of discovery source (sitemap, crawl, CMS export, analytics, etc.)
  • type (HTML, PDF, image, etc.)
  • last_seen
  • priority / importance

Why: you need a starting set to test against, and a way to compare intended URLs vs actual reachable URLs.

2) HTTP response data

For every URL you fetch, store:

  • requested_url
  • final_url after redirects
  • redirect_chain (each hop with status code and location)
  • status_code
  • content_type
  • response_headers
  • response_time
  • fetch_timestamp

Why:

  • Broken redirects often show up as 3xx chains ending in 4xx/5xx
  • Canonical targets may be redirecting unexpectedly
  • You can detect redirect loops, long chains, and soft failures

3) HTML canonical data

For each HTML page, parse:

  • <link rel="canonical" href="...">
  • Whether it is:
    • absolute or relative
    • valid URL
    • self-referential
    • cross-domain
  • Page source URL vs canonical target

Also store:

  • canonical_target
  • canonical_present boolean
  • canonical_parse_errors

Why:

  • Broken canonical tags can point to 404s, redirects, non-canonical variants, or malformed URLs

4) Indexability / page directives

Store:

  • meta robots content
  • X-Robots-Tag header
  • robots.txt crawl allowance status
  • noindex / nofollow flags

Why:

  • A canonical target that is blocked or noindexed may indicate a conflicting setup
  • Helps explain why a page is not behaving as expected

5) Redirect mapping data

Maintain a redirect graph:

  • source_url
  • target_url
  • status_code
  • redirect_type (301, 302, 307, 308)
  • hop_number
  • chain_id

And derived properties:

  • loop detection
  • chain length
  • final destination
  • whether target is canonicalized elsewhere

Why:

  • You’ll need this to identify broken redirect rules, chains, loops, and non-final destinations

6) Canonical graph / cluster data

Build relationships between:

  • page URL
  • declared canonical
  • final redirect destination
  • preferred indexable URL

Useful fields:

  • cluster_id
  • primary_url
  • alternate_urls
  • conflict_reason

Why:

  • The best bug detection comes from comparing multiple signals:
    • canonical tag
    • redirect destination
    • sitemap URL
    • actual indexed/preferred version

7) Crawl context

Store crawl metadata:

  • user-agent used
  • crawl depth
  • source page
  • referrer
  • crawl date/time
  • locale/device if relevant

Why:

  • Some canonicals/redirects vary by user-agent, location, or device
  • Useful for reproducing issues

8) Optional but very useful signals

If available, add:

  • sitemap URLs and lastmod
  • Google Search Console or indexing data
  • server logs
  • CMS canonical settings
  • analytics landing page data
  • hreflang mappings

Why:

  • Helps distinguish “technically broken” from “strategically wrong”

Minimum viable dataset

If you want the smallest useful set, capture these fields:

For every URL:

  • url
  • status_code
  • final_url
  • redirect_chain
  • content_type

For HTML pages:

  • canonical_target
  • canonical_present
  • meta_robots
  • x_robots_tag

For analysis:

  • crawl_timestamp
  • source
  • response_headers

Common issues you can detect with this data

  • Canonical points to 404/500
  • Canonical points to a redirecting URL
  • Canonical points to a non-indexable page
  • Self-canonical missing or malformed
  • Redirect chain too long
  • Redirect loop
  • Mixed signals: page A canonicalizes to B, but B redirects back to A
  • Canonical target differs from final redirect destination
  • Canonical URL uses http vs https or www vs non-www inconsistently

Suggested data model

A practical schema could include tables like:

  • urls
  • fetches
  • redirect_hops
  • canonicals
  • robots_directives
  • clusters

If you want, I can also give you:

  1. a database schema,
  2. a JSON structure, or
  3. a crawl pipeline design for this tool.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.