问题原文
原帖链接 · Markus Laire · CC BY-SA 3.0
In my website the root page https://www.amolelingue.com/ has 301 redirect to canonical English URL https://www.amolelingue.com/en, which has two alternate versions (/it and /fi).
I'm getting following two errors in International Targeting of Search Console of Google Webmaster Tools:
- "no return tags", originating URL "/", alternate URL "https://www.amolelingue.com/en"
- "no return tags", originating URL "/", alternate URL "https://www.amolelingue.com/it"
Each of the three pages (/en /it /fi) lists itself as canonical version and also has hreflang-links to all three pages. For example English version has:
<link rel='canonical' href='https://www.amolelingue.com/en'>
<link rel='alternate' href='https://www.amolelingue.com/en' hreflang='en'>
<link rel='alternate' href='https://www.amolelingue.com/it' hreflang='it'>
<link rel='alternate' href='https://www.amolelingue.com/fi' hreflang='fi'>
Nowhere do I mention "/" as canonical URL, so why am I getting errors about it not having return tags? Have I done some error here or is Google Webmaster Tools reporting this incorrectly?
已采纳解答
原帖链接 · GDVS · CC BY-SA 3.0
Your configuration is incorrect. Rather than permanently redirect the root to https://www.amolelingue.com/en.
Either:
- Do a conditional redirect, i.e. test the user's browser language and do a temporary redirect to the appropriate language page,
/en,/itor/fi. - Don't redirect the root at all, and have a page on which users can select the version they want.
Then identify the root with "x-default" as follows:
<link rel="alternate" href="https://www.amolelingue.com/en" hreflang="en">
<link rel="alternate" href="https://www.amolelingue.com/it" hreflang="it">
<link rel="alternate" href="https://www.amolelingue.com/fi" hreflang="fi">
<link rel="alternate" href="https://www.amolelingue.com/" hreflang="x-default">
Google's documentation on hreflang is here, and the relevant part is:
[…] the reserved value "x-default" is used for indicating language selectors/redirectors which are not specific to one language or region, e.g. your homepage showing a clickable map of the world.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
