benD-11
Hi there,
We've been advised that the hreflang on our site is not correct:
hidden link the current Hreflang configuration looks like this:
<link rel="alternate" hreflang="en-gb" href="hidden link " />
<link rel="alternate" hreflang="fr-fr" href="hidden link " />
<link rel="alternate" hreflang="en-us" href="hidden link " />
<link rel="alternate" hreflang="x-default" href="hidden link " />
But it should be updated to add that default EN code, and look like this:
<link rel="alternate" hreflang="en" href="hidden link " />
<link rel="alternate" hreflang="en-gb" href="hidden link " />
<link rel="alternate" hreflang="fr-fr" href="hidden link " />
<link rel="alternate" hreflang="en-us" href="hidden link " />
<link rel="alternate" hreflang="x-default" href="hidden link " />
I can't find a way of adding just en hreflink.
Any advice is greatly appreciated.
Thanks
David
Bobby
Supporter
Languages:
English (English )
Timezone:
America/Los_Angeles (GMT-08:00)
Hi David,
Go to WPML->Languages->Edit languages and from there you can edit the hreflang.
Let me know your results, please.
Related Documentation:
https://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/
benD-11
Thanks Bobby,
This will add a whole new language site right?
We just want an additional hreflang tag that links to the same as en-gb but with hreflang="en"
Thanks
David
Bobby
Supporter
Languages:
English (English )
Timezone:
America/Los_Angeles (GMT-08:00)
Hi David,
A language cannot have 2 hreflangs attached to it only 1. From within WPML->languages->edit languages, you can edit and adjust the existing language's hreflang.
The person or company advising that the hreflang is wrong what is their recommendation?
You should not need to add a new language just edit the existing hreflang.