SEO QA · Verification process
Canonical testing verifies that each page declares the right preferred URL and that the declaration stays stable through template, routing and configuration changes. Canonical defects are silent: the page looks identical to visitors while ranking signals consolidate to another URL.
Definition
A canonical test checks the value on each URL against a rule for its template, then checks that the target is a 200, indexable URL. A canonical diff compares the value with the previous crawl and flags every change not listed in a ticket. For what canonicals do, see the Academy lesson on canonicals. For fixing existing issues, see canonical tag issues.
Test cases
| Test case | Pass | Fail |
|---|---|---|
| Present | One tag on every indexable template | Missing |
| Absolute and valid | Full URL, correct protocol and host | Relative, malformed, wrong host |
| Single source | One canonical across HTML and Link header | Two tags, or HTML and header disagree |
| Follows template rule | Matches the pattern below | Different pattern |
| Target status | Target returns 200 | Target redirects or errors |
| Target indexable | No noindex, not blocked | Target excluded from indexing |
| Stable | Same value as the last crawl | Changed without a ticket |
| Consistent within template | Every URL of a template follows one pattern | Pattern varies |
Expected pattern per template
| Template | Expected canonical | Common release defect |
|---|---|---|
| Product or article | Self | Points to parent category after a breadcrumb refactor |
| Paginated listing | Self per page | All pages point to page 1 |
| Filtered or sorted listing | Unfiltered listing, if that is the site policy | Self canonical, creating many indexable variants |
| Tracking parameter URL | Clean URL | Parameter kept in canonical |
| Localized page | Self, with hreflang to alternates | Points to default language |
Write the pattern for each template down as an acceptance criterion, so the test has a fixed expected value.
When to test
- Updates to head components, SEO plugins or meta frameworks
- Changes to base URL or environment configuration
- Pagination, filter or parameter handling changes
- Trailing slash or URL casing rule changes
- Domain moves, where every canonical host must change
Pre and post-deployment workflow
Diffing one field across two crawls exposes template-wide changes in seconds. Audit comparison lists every URL whose canonical moved. Canonicals sent in the HTTP Link header need the header test in HTTP header SEO testing.
Before and after example
/shoes/?page=3 → canonical /shoes/?page=3
/shoes/?page=3 → canonical /shoes/