Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

I recently found an issue with my site when trying to set up a staging site. I use different domains for different language, and it appears the primary domain and public_html are set as different sites.

From Siteground:
The main domain of your account(Site Tools) is -> your-domain.jp
The parked domain is -> your-domain.co.uk
The site in the public_html is configured to work/load as your-domain.co.uk:

What is the best/easiest solution to this problem?

Solution:

When setting up the Language URL format for A different domain per language, you must follow our guide here.

https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

The server and DNS settings must be correctly applied to make it work. Those are not settings in WPML.

In your case, your-domain.co.uk should be your site's main domain associated with your site's default language language. All the other domains, including your-domain.jp, should be the alias of the main domain, according to how we explain in the guide.

I can't tell why you see it otherwise in Siteground's settings. You should make sure the settings are correct. Also, consult Siteground's support about it.

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.

This topic contains 3 replies, has 2 voices.

Last updated by Itamar 1 year, 5 months ago.

Assisted by: Itamar.

Author Posts
December 9, 2023 at 2:19 pm #15029365

jamieb-2

Hi there,

I recently found an issue with my site when trying to setup a staging site. I use different domains for different languages(www.cotswoldsadventures.co.uk/www.cotswoldsadventures.jp) and it appears the primary domain and public_html are set as different sites.
From Siteground:
The main domain of your account(Site Tools) is -> cotswoldsadventures.jp
The parked domain is -> cotswoldsadventures.co.uk
The site in the public_html is configured to work/load as cotswoldsadventures.co.uk:

What is the best/easiest solution to this problem?

Should I change the public_html to cotswoldsadventures.jp so it matches the primary domain?

Alternatively (but less atrraxtvie)
would confugirng my site as follows work?
cotswoldsadventures.co.uk/en for English content
cotswoldsadventures.co.uk/jp for Japanese content

If I did this would I lose the SEO for the pages as they would be a different address?

(baseos | cotswoldsadventures.jp | u534-5kdthpzvwxbh@uk39.siteground.eu:~/www/cotswoldsadventures.jp/public_html$ wp option get home
hidden link
baseos | cotswoldsadventures.jp | u534-5kdthpzvwxbh@uk39.siteground.eu:~/www/cotswoldsadventures.jp/public_html$ wp option get siteurl
hidden link)

December 11, 2023 at 8:39 pm #15040831

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

You wrote: "I recently found an issue with my site when trying to setup a staging site."

I'm confused.

Is the problem with the production site or the staging site?

If it is just for the staging site, I think it is better you switch to the Language URL format of " Different languages in directories". This is because the DNS settings you set for the production site at hidden link cannot work for the staging site, which should be in a different URL.

Regards,
Itamar.

December 11, 2023 at 9:00 pm #15040877

jamieb-2

Hi there, Thanks for the reply.
The problem is with the main site- I just realised it when trying to make a staging site (which I no longer need) that the primary domain and public_html are different sites (as I described above)

Please advise on best course of action

Thanks

Jamie

December 12, 2023 at 10:20 am #15044115

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jamie.

Thanks for clarifying the issue.

When setting up the Language URL format of A different domain per language, you need to follow our guide here.

https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

The server and DNS settings must be correctly applied to make it work. Those are not settings in WPML.

In your case, hidden link (with WWW) should be your site's main domain associated with your site's default language language. All the other domains, including hidden link, should be alias of the main domain, according to how we explain in the guide.

I can't tell why you see it otherwise in Siteground's settings. You should make sure the settings are correct. Also, consult Siteground's support about it.

Regardless of the wrong settings on Siteground, is it working as expected?
If it does, then maybe you have nothing to worry about.

Regards,
Itamar.