Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe de WPML répond aux messages du forum 6 jours sur 7, 22 heures sur 24.

This topic contains 1 réponse, has 2 participants.

Last updated by Jamal il y a 6 mois et 3 semaines.

Assigned support staff: Jamal.

Auteur Messages
mars 25, 2019 à 9:26 #3458251

alexandra-zwangL

Hi,

We have translated a website with WPML from English to French (but we have switched the main languages)

We have received an alert from the Google Search Console that said to us that the hreflang attribute was not correct.

Here is the exact alert message :

"We have detected that the implementation of the "rel-alternate-hreflang" tag is incorrect on some pages of your site. In particular, there appears to be a problem with language and region code, or incorrect two-way links. If page A points to page B using the "hreflang" attribute, there must also be a link from B to A. We use the "hreflang" attributes to display the URL that corresponds to the language or to the user's region in the search results.

Your website will not be eligible for additional targeting by language or region until you fix the hreflang links.

To solve this problem right now:
Identify the incorrect implementation of the "hreflang" attribute"

Can you explain what is the matter please ? It would help us to solve the problem.

mars 26, 2019 à 2:23 #3463421

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

I have checked the homepage and i believe alternate links are generated correctly. These links have only language code without region code. If you are not delivering for example french for 2 regions you won't need to instruct region code (fr-FR fr is language code and FR is the region code).
Unless you are providing more than one version in a language, region code might be dismissed.

Otherwise, there is probably an other page presenting this issue, would you give me an example ?

Please note that these settings are available in the "Edit Language table" in WPML->Languages, especially the hreflang column.

I would also like to get your debug informations as described in this article.
https://wpml.org/fr/faq/comment-fournir-des-informations-de-debogage-pour-une-assistance-plus-rapide/

Finally, you can use french if you want 🙂

Best regards,
Jamal
WPML Support

Le sujet ‘[Fermé] alert from the Google Search Console’ est fermé à de nouvelles réponses.