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.

This topic contains 9 replies, has 1 voice.

Last updated by Laura 2 weeks, 4 days ago.

Assisted by: Laura.

Author Posts
July 20, 2025 at 9:47 am #17252808

myoW

Background of the issue:
I am trying to fix the hreflang in the XML sitemap because it is wrong. I noticed this issue when an Ahrefs audit showed a lot of 'Hreflang to redirect or broken page' errors. You can see the issue here: view-source:hidden link.

Symptoms:
The hreflang in the XML sitemap is incorrect, and Ahrefs audit reports many 'Hreflang to redirect or broken page' errors.

Questions:
How can I correct the hreflang in the XML sitemap?
What causes 'Hreflang to redirect or broken page' errors in Ahrefs?

July 21, 2025 at 6:18 am #17253771

myoW

This is a serious SEO issue. I need to fix it ASAP.

July 22, 2025 at 3:39 pm #17260161

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

Thanks for contacting us.

Could you please see if this solves your issue?

July 23, 2025 at 3:02 am #17261536

myoW

I am disappointed. After a long wait, the answer I got is totally unrelated one. Have you even tried to understand my issue? Have you even check the screenshot? Your answer is totally unrelated. Check my post again because I am not gonna explain again for your laziness.

July 23, 2025 at 9:23 am #17262933

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I read your post and the errata I sent you matches several criteria. With the information you provided I'm not able to debug the issue.

If the errata doesn't help, we'll need a staging site where we can run some tests.

July 23, 2025 at 10:06 am #17263073

myoW

I can give the admin account and you can clone to your staging website which should not be public and required to delete after the ticket is closed.

July 23, 2025 at 11:00 am #17263422

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Ok.

July 23, 2025 at 3:35 pm #17264656

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I couldn't see the issue on the migrated site, so I checked back your site's sitemap and I can't see the issue there either.

Do you still get ahrefs errors?

Screenshot_20250723_173315.png
July 24, 2025 at 3:27 am #17265905

myoW

The other day I saw an update for WPML SEO and I updated it. It still didn't fixed it but now since you don't see the issue, I cleared all the cache and regenerated the xml sitemap. Now, I no longer see the issue. Thank you for your help and don't forget to delete your staging site.

July 24, 2025 at 10:28 am #17266921

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

It's already deleted. Thanks.