« Canonical tags & meta robots directives
Canonical: tag vs. header conflict
A canonical URL can be declared two ways: an HTML tag, or an HTTP response header. This page sets both, and they disagree.
<link rel="canonical"> tag says | https://testingurl.dev/scraping/crawler-directives/canonical-conflict |
Link HTTP header says | https://testingurl.dev/scraping/crawler-directives/canonical-self |
There's no universal rule for which one wins. Worth checking how whatever tool you're building handles it, and documenting the choice, rather than assuming one source is authoritative.