Skip to content Skip to sidebar

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
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

This topic contains 1 reply, has 0 voices.

Last updated by Itamar 11 hours, 21 minutes ago.

Assisted by: Itamar.

Author Posts
August 20, 2025 at 9:49 am #17333578

samanthaB-3

Background of the issue:
To improve SEO and avoid duplicate hreflang data, WPML now adds hreflang tags only to the sitemap. I have disabled the hreflang tags in the page's <head> section. I am trying to see if the hreflang tags are appearing in the sitemap as expected.

Symptoms:
The Rankmath Sitemap is not showing hreflang tags, and the option to enable them in the <head> is not enabled.

Questions:
Are hreflang tags supposed to appear in the sitemap when using Rankmath, or is this feature only compatible with Yoast?
Why are the hreflang tags not visible in the sitemap despite the settings? What I was wondering I have german formal on my website so i needed to have a different unofficial code. Might that be the problem?

August 20, 2025 at 1:05 pm #17334339

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

To see the hreflang attributes, you need to view the page's source. (Right click -> View Page Source.) If you are looking for the hreflang attributes on the sitemap index here: hidden link, you will not find them, because the index page should not include them. However, if you check a specific sitemap, like the posts sitemap, you will find them: hidden link. Check it here: view-source:hidden link. Please see the attached screenshot.

Please let me know if you have any further questions.

Regards,
Itamar.

2025-08-20_16-02-10.jpg