Skip Navigation

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

Problem:
The main domain is mydomain.be. The second domain is mydomain.com. My objective here is: when people are in Dutch, they see the .be site. When they're in English, they see the .com site.

Solution:
Set up both domains to point to the same server IP address and the same directory where WordPress is located. Alias configuration should all point to the same physical folder where your WordPress is being installed. URL should show the same website.

Relevant Documentation:
https://wpml.org/tutorials/2016/04/use-wpml-different-domains-per-language/

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 7 replies, has 2 voices.

Last updated by jeroenV-58 4 years, 1 month ago.

Assisted by: Dražen Duvnjak.

Author Posts
March 17, 2020 at 9:51 pm #5705667

jeroenV-58

I want hosting advice on a multi-domain WPML installation (two TLD domains).

The main domain is mydomain.be. The second domain is mydomain.com. My objective here is: when people are in Dutch, they see the .be site. When they're in English, they see the .com site.

My site runs on a shared reseller environment of my own. I have cpanel access but cannot create addon domains. Is that a problem? In this tutorial (which I followed but I got stuck in the middle) there is no mention of the need of addon domains: https://wpml.org/tutorials/2016/04/use-wpml-different-domains-per-language/

Please help me with this so I can set up my .be and .com WPML installation...
Thanks

March 18, 2020 at 12:20 pm #5710497

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

if you can not add Addon domains you can use Parked domains option as instructed in documentation.

Otherwise, if you are not using CPanel you will need to set up Manual DNS settings for domains.

You need to set up both domains to point to the same server IP address and the same directory where WordPress is located.

Whichever route you choose, the most important thing to consider is that the alias configuration should all point to the same physical folder where your WordPress is being installed. URL should show same website and WPML will take care of showing different languages for different domains.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

March 18, 2020 at 7:24 pm #5713965

jeroenV-58

Hi Drazen,

I have done everything according to the instructions.

Still, the redirect does not work properly.

I want to share my credentials but not here on the public forum.
Also I don't want to share my website url name. How can I do this privately?

In attachment the issue that I experience. But DNS is Okay and redirect also OK.
Also, hosting is perfectly OK. I contacted them and this was their answer:

"I have closely reviewed the guide and noticed that they suggest the configuration to be done via Parked domains. Whenever you park a domain name, its root directory is automatically set to be public_html. This said it would not be necessary to upgrade your hosting plan as on our StartUp hosting plan you can create Parked domains from your cPanel > Parked domains section."

As you can see, everything is set up like WPML suggests. Still no result. A bug? What should I do next?

How can I share more private details?

March 19, 2020 at 7:28 am #5716865

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Thanks for the feedback.

I can see your URL in the debug information you shared, also any links and images shared are only visible to us.

We are not allowed to access your hosting account for security reasons, I can access your WP admin dashboard but the problem is not there. WPML configuration is correct but not working since domains are not set up.

That being said, you will need to set up your domains DNS as instructed, manually or via parked/addon domains.

I see your hosting said you are allowed to add Parked domains, so you can easily just add .com domain as parked domain ( cPanel > Parked domains section.)

You can see in the images I shared your domains currently have different DNS configurations.

Please let me know how it goes and don't hesitate to ask if you find any problem along the way.

Regards,
Drazen

Screenshot_2.jpg
Screenshot_1.jpg
March 19, 2020 at 6:54 pm #5722893

jeroenV-58

Hi Drazen,

Thanks for your valuable feedback.

Are the screenshots you attached private ones? They contain private information.

I have both domains in the correct DNS regarding the A records. The other records wouldn't matter, I'd assume?

In any case, it does work now. The translation is active on the .com site.

My finding is that the "validate when saving" checkbox is the cause of the bug. When I uncheck it, all settings save correctly, and the domain switch functions as expected. When I check the checkbox, and I save, I get the error: "Not valid". What does WPML mean with "not valid"? What is "not valid"? In any case, it seems valid though, as front-end everything runs well...

screenshot.PNG
March 19, 2020 at 6:55 pm #5722919

jeroenV-58

Question: can you delete the image from my response https://wpml.org/forums/topic/i-want-hosting-advice-on-a-multi-domain-wpml-installation-two-tld-domains/#post-5713965?
It contains still my url name I see...
I can't do it myself.
Thanks

March 20, 2020 at 7:49 am #5725987

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Glad to hear it is working now. 🙂

I have deleted the image as requested.

That function "Not valid" can sometimes give a false positive error, it could be that WPML can not test the domains correctly due to server configuration or domain configuration.

In your case, I think this issue happens since you are telling WPML to check the HTTPS version of .com site, and you don't have HTTPS active on .com domain and thus WPML can not reach and test that address.

You can also see that if you switch to the English language on the frontend it goes to HTTP version. I would advise for security and SEO reasons to implement HTTPS to .com domain, too.

Let me know if there is anything else I can help you out with, I will be glad to do so.

Regards,
Drazen

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.