I am working on a website that has Turkish, English, German and French versions. The tags in the head part of the Turkish main page are as follows:
<link rel=canonical href='https://www.example.com/tr'/>
<link rel=alternate hreflang=tr href="https://www.example.com/tr/"/>
<link rel=alternate hreflang=en href="https://www.example.com/en/"/>
<link rel=alternate hreflang=x-default href="https://www.example.com/en"/>
<link rel=alternate hreflang=de href="https://www.example.com/de/"/>
<link rel=alternate hreflang=fr href="https://www.example.com/fr/"/>
These tags cause the “Pages with hreflang elements” and “Missing return links” errors when audited via SEO software.
The same tags for the French page are:
<link rel=canonical href="https://www.example.com/fr"/>
<link rel=alternate hreflang=tr href="https://www.example.com/tr"/>
<link rel=alternate hreflang=en href="https://www.example.com/en"/>
<link rel=alternate hreflang=x-default href="https://www.example.com/en"/>
<link rel=alternate hreflang=de href="https://www.example.com/de"/>
<link rel=alternate hreflang=fr href="https://www.example.com/fr"/>
There are links to every other language version on every page, for example on the French page:
<a href="https://www.example.com/tr" hreflang=tr>
<a href="https://www.example.com/en" hreflang=en>
<a href="https://www.example.com/de" hreflang=de>
Is there anything wrong in this structure?
2
Answers
I have found the issue: As the remove_quotes filter of mod_pagepeed module removed the quotes of the tags, tools could not read the rel and hreflang values.
It works fine after disabling the filter.
Using
x-default
wrongYour
x-default
should not point to your English page. Instead it should point to a page for users to choose their language or get redirected to the appropriate language. If you are going to use it, it should probably be<link rel=alternate hreflang=x-default href="https://www.example.com/"/>
. See Introducingx-default hreflang
for international landing pages | Google Developers