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.
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?
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.
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 ?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.