Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with hreflang tags not being inserted correctly on their multilingual site. The tags are using translated slugs for both the French (FR) and English (EN) links, where the English link should display 'prints' instead of 'prints-fr'.
Solution:
We reviewed the site and found that the hreflang tags are functioning correctly for the pages we checked, such as the 'off-piste and ski touring photo sessions' page. Here, the hreflang tags correctly point to the respective EN and FR versions, as well as the x-default:

<link rel="alternate" hreflang="en" href="https://ollybowman.com/services/off-piste-and-ski-touring-photo-sessions/" /><br /><link rel="alternate" hreflang="fr" href="https://ollybowman.com/fr/services/seances-photo-hors-piste-et-ski-de-randonnee/" /><br /><link rel="alternate" hreflang="x-default" href="https://ollybowman.com/services/off-piste-and-ski-touring-photo-sessions/" />

We could not locate a '/print' or '/print-fr' page, which might have been part of an earlier test or no longer exists. If you are still encountering issues on specific URLs, please share them with us for further investigation.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, feel free to open a new support ticket at WPML Support Forum.

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.

This topic contains 1 reply, has 0 voices.

Last updated by Lucas Vidal de Andrade 3 weeks, 1 day ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
April 8, 2025 at 12:27 pm #16908514

ollyB

Background of the issue:
I am trying to ensure that hreflang tags are inserted correctly on my site, hidden link. The default page is in English, and I am checking the source from the French page.

Symptoms:
The hreflang tags are not being inserted correctly. They are using the translated slugs for both the FR and EN links. The English link should be 'prints' and not 'prints-fr'.

Questions:
Why are the hreflang tags using translated slugs for both FR and EN links?
How can I ensure the hreflang tags use the correct slugs for each language?

April 8, 2025 at 2:02 pm #16909865

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Olly,

Thanks for reaching out!

I’ve checked your site and the hreflang tags appear to be working correctly. For example, on the page:

hidden link

the hreflang tags are correctly pointing to the respective EN and FR versions, as well as the x-default:

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

This is the expected behavior.

Also, I couldn’t locate a /print or /print-fr page on your site, which might have been part of an earlier test or no longer exists. If there’s a specific URL where you’re still seeing the issue, feel free to share it and I’ll take another look.

Best regards,
Lucas
WPML Support Team