The problem you have is caused by the combination of canonical
and hreflang
.
Your setup
Given your example: for the URL https://example.com/au/publications?count=50&page=4
you specify the following:
<link rel="canonical" href="https://example.com/au/publications">
<link rel="alternate" hreflang="en-US" href="https://example.com/us/publications">
What's going on?
This is how Google reads these information:
- This URL is a 1:1 duplicate of
https://example.com/au/publications
and I shall not index it
- but this URL also has an alternate language version for "en-US" available at
https://example.com/us/publications
What does this mean to Google?
- the canonical is not a directive Google may respect it
- the hreflang is a very important information, Google has to validate it by checking the alternate URL for return tags
What you see in your Search Console is that Google is doing exactly this: It ignores your canonical, visits the defined alternate URL and checks whether it links back to the original URL (with parameters).
The specified alternate URL does not link back to the parameterized URL and therefore causes an error.
How to get rid of this mess?
First: try not to distract Google.
- If a URL is not a canonical URL - meaning is has parameters and links to a clean URL via
link rel="canonical"
→ do not serve hreflang
information.
- If a URL is a canonical URL- meaning it is the one you want to be indexed an rank in search results and it has alternate language versions → do serve
hreflang
information for each language.
Applied to your example
- for the URL
https://example.com/au/publications?count=50&page=4
you only specify the canonical link: <link rel="canonical" href="https://example.com/au/publications">
- for the URL https://example.com/au/publications you specify
- the self referential canonical:
<link rel="canonical" href="https://example.com/au/publications" />
- each language version:
<link rel="alternate" hreflang="en-US" href="https://example.com/us/publications">
and <link rel="alternate" hreflang="en-AU" href="https://example.com/au/publications">
Now Google reads:
https://example.com/au/publications?count=50&page=4
is a 1:1 duplicate of https://example.com/au/publications
→ I shall not index it
https://example.com/au/publications
targets "en-AU" language users and has an alternate version for "en-US" users available at https://example.com/us/publications
Last but not least: be aware to only serve hreflang
information, when there are translations available. If there are no translations of a specific URL it does not need hreflang
annotation.
Sources
Visit the Google Guide on Use hreflang for language and regional URLs.
For your specific problem have a look at the video and wait for 08:50