[Bug] improve HTML Canonical Link behavior #241
Labels
💻 aspect: code
Concerns the software code in the repository
🛠 goal: fix
Bug fix
🟥 priority: critical
Must be fixed ASAP
🏁 status: ready for work
Ready for work
Description
Simplistic HTML Canonical Link support was added in #237. However it wrongly always uses the legal tool's Legacy Canonical URL.
Examples
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/deed.en
https://creativecommons.org/publicdomain/zero/1.0/
https://creativecommons.org/publicdomain/zero/1.0/deed.en
Expectation
The HTML Canonical Link should point to appropriate language-specific Deed or Legal Code page without the
.html
extension.Consolidate Duplicate URLs with Canonicals | Google Search Central | Google Developers:
Page Examples
HTML Canonical Link:
https://creativecommons.org/licenses/by/4.0/deed.en
/licenses/by/4.0/
(Legacy Canonical URL, HTTP server configured to use default index page:index.html
)/licenses/by/4.0/deed
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/deed.html
(symlink to default language:deed.en.html
)/licenses/by/4.0/deed.en
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/deed.en.html
/licenses/by/4.0/index.html
(symlink to default language:deed.en.html
)HTML Canonical Link:
https://creativecommons.org/licenses/by/4.0/deed.nl
/licenses/by/4.0/deed.nl
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/deed.nl.html
HTML Canonical Link:
https://creativecommons.org/licenses/by/4.0/legalcode.en
/licenses/by/4.0/legalcode
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/legalcode.html
(symlink to default language:legalcode.en.html
)/licenses/by/4.0/legalcode.en
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/legalcode.en.html
HTML Canonical Link:
https://creativecommons.org/licenses/by/4.0/legalcode.nl
/licenses/by/4.0/legalcode.nl
(HTTP server configured to serve content without.html
file extension)/licenses/by/4.0/legalcode.nl.html
HTML Example
https://creativecommons.org/licenses/by/4.0/deed.en
Change Approval
Dropping the shorter English-favoring Legacy Canonical URL in favor of the HTML Canonical Link was discussed with and approved by the CC Legal Team.
Additional context
The text was updated successfully, but these errors were encountered: