[Resolved] Main domain and site in the public_html is different
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.
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.
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)
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.
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)
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.