Metadata and search guides

Diagnose conflicting canonical links in saved catalogue HTML

·

A seasonal catalogue moved its field notes into the spring directory. The saved HTML includes an old canonical link. Resolve the current declaration and find which template entries need editing.

Canonical URL Checker

Find the matching and conflicting targets

Load the example and choose Check canonical URLs. The base on line 5 resolves to https://catalog.example.com/spring/. The relative declaration on line 6 resolves to the preferred address, https://catalog.example.com/spring/field-notes.

Line 7 points to old-notes. The report labels the two valid head targets as conflicting. The declaration on line 11 appears outside the head and receives a placement finding.

HTML Standard, document base URLsGoogle Search Central, specify a canonical

Recheck one intended head declaration

Remove the old head entry and the declaration in the body. Replace ./field-notes with https://catalog.example.com/spring/field-notes in the remaining head link.

Check the edited HTML again. The report shows one matching head canonical. The relative URL finding disappears. Save the JSON if you need to share the supplied evidence with the catalogue team.

Google Search Central, specify a canonical

Distinguish the document URL from the intended canonical

The document address still points to archive/index.html with a query. The optional preferred field tells this check which canonical you intend to declare. If you clear it, comparison uses the document address.

The comparison keeps path case, trailing slashes and query order. A saved declaration is one canonical signal. Published redirects, HTTP Link headers and search indexing decisions require their own evidence.

Google Search Central, specify a canonical

Common questions

Do hostname case and default ports affect matching?

The URL parser normalizes the hostname and drops the default port for HTTP or HTTPS. The comparison preserves path and query distinctions.

What if the saved source includes two base elements?

The first base with an href supplies the base candidate. The report lists later hrefs and their source lines separately.

Sources

Put it into practice.

Related guides