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.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

Tagged: 

This topic contains 3 replies, has 1 voice.

Last updated by Bobby 4 days, 3 hours ago.

Assisted by: Bobby.

Author Posts
April 10, 2025 at 5:13 pm #16920056

steefB-2

Background of the issue:
I am trying to set up hreflang tags for two languages, Dutch and English, with the tags nl and en-nl. The issue can be seen on this page: hidden link.

Symptoms:
ScreamingFrog is reporting an unexpected html alternate hreflang 4 url en-gb that redirects everything to the homepage, causing errors due to incorrect return tags.

Questions:
How can I remove or configure the incorrect hreflang tag?
Why is there an en-gb hreflang tag when I only set up nl and en-nl?

April 14, 2025 at 12:43 pm #16929515

Bruno Kos
WPML Supporter since 12/2018

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

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

Hi,

Thanks for the detailed explanation.

From what I can see on the page you linked — hidden link — the current hreflang setup looks correct:

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

So based on this output, there’s no sign of an `en-gb` hreflang tag on the live page.

To better understand what’s happening, could you please share screenshots from the SEO tool (Screaming Frog)? Specifically, it would be helpful to see where it’s detecting the `en-gb` tag and how it’s being reported. That way, we can narrow down whether the issue is with WPML’s output or possibly a cached or third-party-generated tag.

Just as a note: WPML generates hreflang tags automatically based on the site's language settings. You can also customize hreflang codes (for regional targeting, like `en-nl`) directly in the WPML settings if needed. Here's a reference from WPML’s documentation that explains how this can be done:
https://wpml.org/documentation/support/adding-hreflang-wordpress/#regional-targeting

Once we have more info or a screenshot from Screaming Frog, we can dig further into what’s causing that `en-gb` tag to appear.

Looking forward to your update!

April 18, 2025 at 6:31 am #16946278

steefB-2

Hey Bruno,
Thanks for your reply!
I do find the hreflang also on the live page (search for en-gb).
Hope that helps in resolving the issue.
Steef

Screenshot 2025-04-18 at 08.29.32.png
April 18, 2025 at 4:18 pm #16947809

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

I was able to locate the en-gb hreflang.

<link rel="alternate" href="hidden link" hreflang="en-gb" />

This hreflang would not come from WPML as we don't add the hreflangs at the end of the header, also if EN-GB is not activated in WPML->Languages->Edit languages, then we can assume it's not coming from the plugin.

Is it possible that custom code was manually added in the header.php ?

Please review your theme's header.php and scroll to the bottom right before it closes -> do you see the custom code?

Are there any other plugins that could possibly add the hreflang ?