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.

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-08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year, 5 months ago.

Assisted by: Bobby.

Author Posts
July 21, 2023 at 2:52 pm #14080877

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

July 21, 2023 at 10:04 pm #14082195

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/

July 28, 2023 at 7:25 am #14114893

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

July 28, 2023 at 5:14 pm #14119189

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.

The topic ‘[Closed] no en hreflang’ is closed to new replies.