Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 -
- 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 10 months ago.

Assisted by: Nicolas V..

Author Posts
June 9, 2023 at 1:24 pm #13799897

lauraL-17

I can getting hreflang conflicts within page source code on my website hidden link. I have provided a screenshot. How do I go about fixing this?

Kind regards
Robyn

unnamed.png
June 9, 2023 at 8:29 pm #13802079

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum.

Could you please explain me what is the conflict here. I checked the screenshot and everything seems normal. Let me explain:

<link rel="alternate" hreflang="fr" href="<em><u>hidden link</u></em>" />

This line declare the hreflang url for the french version (which is the correct URL)

<link rel="alternate" hreflang="en" href="<em><u>hidden link</u></em>" />

This line adds the English translation the URL is also correct. However I can see that the content of this page is in French. I checked your debug file and you have the option "Translatable - use translation if available or fallback to default language" activated. So, if the translation doesn't exist, that seems logic that the french version is displayed.

<link rel="alternate" hreflang="x-default" href="<em><u>hidden link</u></em>" />

This declare which one is the default language (original language). From your debug file, French is the default language.

June 12, 2023 at 9:13 am #13807735

lauraL-17

Hi Nicolas, within SEMRUSH I am getting hreflang conflicts within page source code error on my website. I got in touch with SEMRUSH and they said the following:

'I have checked the provided campaign.

Please note that these issues are identified due to the incorrect implementation of the hreflang tags that can be found within the website's code. Please see the following screenshot:

Image_2023-06-09_12-47-32.png (I have attached it here again)

Therefore there is nothing wrong with the translation of the website and the implementation of the hreflang tags should be brought to the webmaster for fixing. Please note that the correct implementation of hreflang tags can help your website increase the chances for ranking, therefore I would definitely recommend looking into it with the help of your webmaster. "

I need to know what I need to do within WPML to solve this issue if possible.

Kind regards
Robyn

Screenshot 2023-06-12 at 10.08.39.png
Image_2023-06-09_12-47-32.png
June 12, 2023 at 2:52 pm #13810765

Nicolas V.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Once again, hreflang links are correctly implemented:
- You have the FR version, the EN version and as "x-default" the FR version (because FR is your primary language).

The issue that I see here is simply that you English article is in fact in French:
hidden link

Maybe if you send me the full report from SEMRUSH I will be able to give you more details.

Also, in case you want to alter the hreflang behavior on your site you can use our hook: https://wpml.org/wpml-hook/wpml_alternate_hreflang/

The topic ‘[Closed] hreflang conflicts within page source code’ is closed to new replies.