Skip to content Skip to sidebar

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

Problem:
You are trying to implement hreflang tags on your site, but they are not appearing as expected.

Solution:
The absence of hreflang tags is not an issue but an improvement introduced in WPML SEO 2.2.2, where hreflangs are moved to sitemaps for better performance with Yoast and RankMath. To include hreflang tags in pages, go to WPML -> Languages -> SEO Options and enable the setting there.

In this case, you should also add the following in your wp-config.php file, to disable it in the sitemaps:

define( 'WPML_SEO_ENABLE_SITEMAP_HREFLANG', false );

If you don't add the constant, the hreflangs will be duplicated. You will have them both in the sitemap and in each individual page. Although it shouldn't be a problem but it's redundant.

For more details on creating multilingual sitemaps, please visit Using WordPress SEO with WPML.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our 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 5 replies, has 0 voices.

Last updated by Waqas Bin Hasan 3 days, 20 hours ago.

Assisted by: Waqas Bin Hasan.

Author Posts
July 21, 2025 at 11:28 am #17255096

loicA-2

Background of the issue:
I am trying to implement hreflang tags on my site, but they have stopped appearing. The issue can be seen on this page: hidden link. I expected to see the following hreflang tags: , , , .

Symptoms:
Hreflang tags are not appearing on the site as expected.

Questions:
Why are the hreflang tags not appearing on my site?
How can I fix the issue with hreflang tags not showing?

July 21, 2025 at 11:55 am #17255436

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, I've moved to this ticket.

I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

Regards.

July 23, 2025 at 10:35 am #17263249

loicA-2

Here is a staging site where everything can be checked

*** removed for security reasons ***

July 23, 2025 at 1:18 pm #17264093

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please do not write access info or other sensitive information directly in the message because these may appear public. For now I've deleted this information from the public message.

Always provide such information in the private form (or the dedicated area) provided with the message.

Your next answer will be private, to share this information safely.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

July 24, 2025 at 10:18 am #17266870

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access, I'll check soon and 'll get back to you accordingly.

July 24, 2025 at 1:54 pm #17267775

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

The issue should be fixed now, in-fact it wasn't an issue but an improvement made in WPML SEO 2.2.2. This moves hreflangs to sitemaps (for Yoast and RankMath), which improves the performance.

However, I've enabled it to include in pages from WPML -> Languages -> SEO Options and is now included in pages. Please see https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/#create-multilingual-sitemaps for details.