Mobile app version of vmapp.org
Login or Join
Welton855

: How to avoid hreflang return errors with URL that contain parameters I'm getting HREF no return errors in search console and I don't understand why. We have a page that contains buttons for

@Welton855

Posted in: #CanonicalUrl #GoogleSearchConsole #Hreflang

I'm getting HREF no return errors in search console and I don't understand why.



We have a page that contains buttons for get multiple pages of results.

URL structure:

Base page: `https://example.com/XX/publications`
Pagination of results: `?count=50&page=4`
Actual url: `https://example.com/au/publications?count=50&page=4`


Source page:

<link rel="canonical" href="https://example.com/au/publications">
<link rel="alternate" hreflang="en-US" href="https://example.com/us/publications">


alternate page:

<link rel="canonical" href="https://example.com/au/publications">
<link rel="alternate" hreflang="en-AU" href="https://example.com/au/publications">


How can I tell Google that it should ignore the URL query parameters?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

2 Comments

Sorted by latest first Latest Oldest Best

 

@Barnes591

The problem you have is caused by the combination of canonical and hreflang.

Your setup

Given your example: for the URL 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 dupliate of example.com/au/publications and I shall not index it
but this URL also has an alternate language version for "en-US" available at 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 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 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:

example.com/au/publications?count=50&page=4is a 1:1 duplicate of example.com/au/publications → I shall not index it example.com/au/publications targets "en-AU" language users and has an alternate version for "en-US" users available at 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

10% popularity Vote Up Vote Down


 

@Shanna517

Hreflang is a bit a nightmare in my limited experience. But I don't think you should ever have just one entry. Each page should have matching link elements, I think.

You can find out more here:
yoast.com/hreflang-ultimate-guide/#hreflang-implementation-choices

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme