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

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year, 6 months ago.

Assisted by: Bobby.

Author Posts
November 30, 2023 at 5:19 pm #14965681

jasminA-2

Hello,

i have this test page: hidden link

Our SEO wants to change all that is under x-default will change to .com:

<link rel="alternate" hreflang="x-default" href="hidden link" />

to

<link rel="alternate" hreflang="x-default" href="hidden link" />

instead of hidden link, it will be change to hidden link

How can i change the hreflag= "x-default"?

Current setup is:

hidden link: this domain is set default to en_AU
hidden link: this domain is set default to en_US

December 1, 2023 at 12:05 am #14968079

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

Hello,

Please review my reply in the forum thread as it could help:
https://wpml.org/forums/topic/how-to-assign-hreflang-x-default-to-root-instead-to-default-language/#post-12333777

In short, the x-default will always be assigned to the default language set within WPML->Languages. It can be changed but that requires custom work which is outside the scope of our support.

December 1, 2023 at 5:06 pm #14974893

jasminA-2

Hello,

Where can i see to modify the x-default using custom code? The problem that i encounter is that we are using 2 websites which is set as per domain language, and each website has its own wpml installed.

December 1, 2023 at 7:49 pm #14975507

Bobby
WPML Supporter since 04/2015

Languages: English (English )

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

Hi there,

That does not sounds like a standard WPML installation.

When using the language URL format "different domain per language " you should not have different installations of WPML.

Please make sure this documentation is followed to prevent issues
https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

The x-default will always be the default language select if you want to change it you can do it using this code from the following ticket, but do note this is not an official suggestion and simply a workaround, if further adjustments are required we recommend reaching out to a developer or a WPML contractor from here : https://wpml.org/contractors/

https://wpml.org/forums/topic/hreflang-x-default-is-missing-from-some-pages-2/#post-11625629

The topic ‘[Closed] x-default’ is closed to new replies.