Autonomous Agentic AI Pipeline
Technical SEO / Declaration diagnostics

Canonical tag checker

Follow the URL, find the conflict.

Enter a public URL or paste HTML to see what each canonical tag actually declares. Resolve relative URLs, expose base-tag surprises, and compare the result with the URL you intended.

Live URL + local HTMLNo accountSource HTML only

XML and XHTML aren't supported. The checker doesn't render JavaScript or check Google indexing.

Check a live URL

Fetched over the public web. Cookies aren’t forwarded. For private pages, paste the HTML below.

Each page URL is limited to 4,096 characters.

Or inspect pasted HTML

Pasted HTML stays in this browser. It isn't uploaded, and its JavaScript doesn't run.

Pasted input is parsed as HTML syntax. XML and XHTML aren't supported.

Required. The URL serving this HTML; resolves relative references. Limit 4,096 characters.

An absolute HTTP(S) URL. We compare declarations to this target; we don't choose one for you.

HTML error recovery can shift where elements appear to sit.

Try an example:

Three URLs, three different questions

The document URL identifies where this HTML is served. A relative canonical uses this URL, unless a base element changes resolution. HTML base URL rules.

The declared canonical is the target expressed by your markup. It can legitimately differ from the document URL, for example when consolidating tracking parameters.

The Google-selected canonical is the representative Google chose during indexing. A declared canonical is a preference; Google can choose a different URL. Google's canonical selection explanation. Find it in Search Console's indexed URL Inspection data; the live test can't predict that choice. Read Google's explanation.

What to fix first

  1. Resolve missing or unusable href values and declarations outside the parsed head.
  2. Keep one canonical link relation, as RFC 6596 advises. A duplicate of the same target is redundant; two different targets disagree.
  3. Check the resolved URL against your intended URL, including its path case, query string, and trailing slash.
  4. Verify the destination separately. Check for a successful response, appropriate content, and consistent canonical signals.

Cross-domain declarations are permitted. They deserve a content and ownership review, rather than an automatic failure. RFC 6596.

Methodology and reproducible checks

The fetch service accepts public HTTP(S) pages, follows up to five redirects, and reads at most 1 MB of source HTML. An oversized response, unsupported content, a timeout, or a fetch failure produces an error rather than a partial verdict.

The response may differ from a browser or Googlebot response. Login-only pages and JavaScript-generated canonical tags aren't supported.

By Michael Lip, AI Website Pipeline. Published project attribution.

The checker parses HTML into a detached document, identifies canonical link tokens on HTML elements, resolves targets, then compares declarations. The document URL is the fallback. When base elements have an href, the first HTML base href in document order governs resolution. A misplaced body base still affects resolution and is flagged for review. HTML base element specification and document base URL rules.

SVG and MathML elements named link aren't HTML canonical declarations. HTML namespace definitions. Findings separate syntax errors, review items, and information. The rule references below distinguish Google-specific behavior from HTML parsing.

Download the same input cases used by this tool's fixture runner. Each case includes its input and the expected finding codes. The runner calls the checker and compares those codes; it doesn't contact a website.

A source declaration in practice

A capture on 8 September 2026 fetched 16 URLs from this site's pre-sprint sitemap once each using Python urllib, following redirects and parsing source HTML. All 16 returned HTTP 200 and 16 contained exactly one canonical declaration. The capture covers one owned site; it isn't a representative sample of the web.

This sample measures response success and source declaration presence. It establishes neither Google selection nor indexing. See how the document, declared, and Google-selected URLs differ.

Download the raw capture JSON, including per-URL timestamps, headers, canonical declarations, and source hashes. Source bytes were hashed but not retained. Download the capture script to inspect the method.

Canonical tag questions

Is a missing canonical tag an SEO error?

No. Google can select a canonical without an explicit declaration. This checker reports absence as information, not an automatic failure. A deliberate declaration is useful when managing duplicate or very similar pages. Google's canonical guidance.

Are relative canonical URLs invalid?

Google supports relative URLs but recommends absolute URLs. This checker resolves a relative target and shows the result, then flags it for review. A base tag or a staging-domain URL can make the resolved target surprising. Canonical URL best practices.

Why was my canonical annotation marked as ignored?

Google doesn't use canonical annotations that also carry hreflang, lang, media, or type attributes. Keep alternate-language and media annotations separate. Google also requires the HTML canonical link element to be in the head. Supported annotations.

Should every page point to the homepage?

Only if the homepage actually represents duplicate content or a superset. Canonical targets should represent the source content. Pointing unrelated pages or later pagination pages at a page that lacks their content is inappropriate. Canonical link relation, sections 3–5.

Does this validate my HTTP canonical header?

No. Live mode displays HTTP Link headers for separate review. A server can declare a canonical in an HTTP Link response header, including for PDFs. Check that header against your HTML declaration, and keep sitemap and canonical signals consistent. HTTP Link method.

Rules reviewed 8 September 2026. Parsing follows the HTML Standard's canonical link and rel-token rules. The tool diagnoses canonical declarations; it doesn't perform complete HTML validation.

Continue your audit with the hreflang checker · homepage tag census · indexing signals explained · Open Graph checker · sitemap validator