Epic #89797: HrefLang / Canonical issues
Behaviour canonical link and HTML lang tag in language overlay
If you on a non-translated alternative language page and the fallback language page is shown, the HTML lang tag provides the wrong language code. It provides the code of the chosen language but it what is actually should provide is the code of the overlay language. For example if you are on a non-translated EN page the fallback language DE is shown. In this case the HTML lang tag should be DE but and not EN.
Second, the canonical link points to the path of the EN page like /en/blablabla which delivers the same content like /de/blablabla which is duplicated content. To solve this problem the canonical link of the non-translated page should point to the URL of the fallback/original page.
TYPO3 version: 9.5.7
#1 Updated by Richard Haeser 4 months ago
- Status changed from New to Needs Feedback
Thanks for your report. For my information. How is your setup and situation? I just tried and could only get this (when:
- Language mode is fallback
- Default language is set as fallback
- There is a page record for default language and for alternative language
- Content in default language and no content in alternative language
So we have a page record but no content for that page. You can set all page properties of the alternative language. You can even decide that you have content for specific colPosses, but not for all. So only empty columns will have a fallback. It is very hard to decide which language code and canonical you need to set in those situations.
How do you see this? When do we set the canonical and language to the fallback language?