Thank you for contacting WPML Support, I will be happy to help you today.
1) Here's an explanation for x-default: hidden link
Also from Google: hidden link
It's the value we set for the hreflang attribute of <link> for the most universal language of the site, that is when the site does not have a language matching the visitor's browser languages.
2) There is no built-in option on WPML to switch it on or off.
I hope that you will find this answer helpful, let me know if you have any other questions.
This is not an issue as the x-default is a special hreflang attribute value that specifies where a user should be sent if none of the languages you’ve set in your other hreflang links match their browser settings. (That's particularly handy if you use our browser language redirect option).
Since your website default language is English, the hreflang=en & hreflang=x-default both will point to same URL.
*Please for more detailed information about hreflang refer the to the links I shared previously.
That code is working for me, I have to make sure what are the cons of removing x-default, What will change after removing it? Will it affect my website critically ?
Also nl-nl this is my hreflnag for netherlands, and fr-be for belgium, I want the last two letters in capital, like nl-NL, fr-BE, In settings it's already in capital format, Attaching a screenshot, If not possible in wpml, Is there a custom code to reflect as nl-NL & fr-BE
1) Regarding your question on removing the x-default from your website:
X-Default Hreflang is a valuable tool in international SEO, and implementing it correctly can significantly benefit your website’s performance and user experience. I would suggest you consult with a SEO specialist for a more detailed explanation on the affect it has on your website.
Hreflang annotations are HTML attributes that tell search engines which language and region a particular webpage targets. This helps search engines to serve the most relevant content to users, regardless of their location.
2) According to Google's specifications, both language and region codes should be lowercase for `hreflang` annotations. That's why, country code(after language code) in hreflang appears in small case. The `hreflang` value "nl-nl" or "fr-be" is technically correct and should work.
Many websites and systems use the mixed case format (e.g., "fr-BE") with the country code in uppercase. Google, being aware of the common practice, has made its algorithms flexible enough to understand and accept both formats.
WPML is configured to render the hreflang attribute in lowercase only as it is recommended,
and I understand your preference, but unfortunately it is something not possible at the moment.
I hope you can understand and I hope this explanation helps.
Feel free to let me know if you need any further assistance. I will be happy to help.
Kind regards,
Marsel
The topic ‘[Closed] Remove x-default hreflang’ is closed to new replies.