Skip Navigation

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

Problem:
The client is setting up a bilingual website with different domains for each language. They followed the WPML guide for using different domains per language but encountered an issue where the secondary domain (.hr) was not validating in WPML and redirected to the primary domain (.eu) when trying to access translated pages.

Solution:
1. We activated the auto-login between domains.
2. We edited our profile to view hidden languages.
3. We added ourselves as a translator to troubleshoot.
4. We discovered that when the language is not hidden, the secondary domain is accessible.
5. We found that changes in translations were not visible on the frontend unless a fake URL parameter was added to bypass the cache.
- We recommend purging all caches, including server-side caches, to resolve the issue with the cache.

If this solution does not seem relevant to your situation, please open a new support ticket with us.

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

Last updated by Nicolas V. 1 year, 3 months ago.

Assisted by: Nicolas V..

Author Posts
January 17, 2024 at 10:19 am #15193999

filipC-6

Hello,

I'm trying to set up a bilingual website.

hidden link -> English (primary)
hidden link -> Croatian

I'm following your article (https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/), but I've run into a problem.

.hr domain is pointing to a server of a primary domain (we're using Siteground), and I've added it as a parked domain for .eu as described in the article.

However, when I get to step 3 (Set up the option in WPML) and check "Validate on save", it says "Not valid".

I've translated 2 pages and tried to access them, and it redirects to the primary domain.

Thanks in advance,

January 18, 2024 at 3:06 pm #15200845

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum.
Did you run the test "Testing if the domains are set properly" from our documentation?
Before setting the option in WPML, you can check if your DNS settings redirect correctly.

Finally, Siteground is known to have a great support, maybe you could ask them to help you out setting DNS but I think that they offer only hosting right?
DNS must be configured at the registrar level (where you bought your domains).

If you pass the test, then the domains should be valid when activating that option in WPML.

January 19, 2024 at 10:31 am #15204133

filipC-6

Hi there,

I've contacted Siteground with this message:

"Hello,

I'm trying to configure a bilingual site that will work on a language-per-domain basis.

The primary domain (English language) is adonomy.eu.

Additional domain (Croatian language is adonomy.hr.

I started the configuration according to the instructions of WPML, the translation plugin - https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with- different-domains-per-language/

Both domains are directed to Siteground nameservers and the additional domain (adonomy.hr) is set as an alias of the primary domain.

I contacted you previously to set it up, but the configuration still doesn't work for me.

I'm stuck at step 2 - "Testing if the domains are set properly".

Disabled WPML and tried to access both .eu and .hr domains. Both addresses should display the same content, but there should be no redirection from .hr to .eu - which is what happens.

Can you help me?

Thanks in advance"

*Siteground replied:

The way that our parked domains work is that the parked domain redirects to the main one, so that's expected behavior.

Did you get an error of some sort while you had both domains set up in the plugin?

*I replied:

Yes, I've got the error that the secondary domain is not valid while setting it up.

But the step prior to activating WPML does not work either - that means that the secondary domain must be accessible without redirection.

I guess after that everything will be valid.

So I guess there must be other way other than parking a domain since it causes a redirect.

*Siteground replied:

If you want both domains to open up the same content - the secondary domain needs to be added as a parked domain indeed

You could either reach out to WPML support to find out more about how the plugin can be set up

I'm not sure what to do.

Thanks in advance,

Filip

January 19, 2024 at 8:14 pm #15206253

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi Filip,

If you want both domains to open up the same content - the secondary domain needs to be added as a parked domain indeed

So basically Siteground confirmed that we're right about the configuration...

The way that our parked domains work is that the parked domain redirects to the main one

... but that they create an automatic redirect and don't offer any solution.

I checked on our forum and the only issue I found related to Siteground has been solved in WPML 4.6.9 (the version you already have): https://wpml.org/errata/siteground-hosting-automatic-translated-pages-are-not-displayed-on-the-front-page/

To be honest I'm not sure how to solve this as the issue is on the server side and they don't seem to cooperate much. I found an old ticket where the client had issues setting up subdomains (which is very similar to setting up domains): https://wpml.org/forums/topic/siteground-missing-cpanel/#post-7228893

It seems that he had to manually delete subdomains folders from the server. That's also true for domains. When using different domains you don't have to create a folder.

Last if you manage to pass the test before activating WPML, then even if the internal test fails in "WPML > Languages" once you activate WPML it should work correctly (sometimes WPML can't penetrate through validation request- in case of CDN or similar setups).

If the issue persist after that, could you please provide me with a temporary admin access (wp-admin and FTP) – so I can escalate the case to the second tier support team and get their feedback.

I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.

IMPORTANT: Before we proceed, please backup your site and database.

January 22, 2024 at 4:04 pm #15212703

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

We're making process! Thanks for the access I did a few things:
- I activated the auto-login between domains
- I edited my profile to be able to see hidden languages
- I added myself as a translator

I noticed two things:
1. If the language is not hidden, I can access the secondary domain
2. If I make a change on the translation, I can't see it on the frontend unless I add a fake url parameter to "trick" the cache

For point #2 - Could you please try to purge all caches you have (including server side caches)
For point #1 - I'm not sure if it's related to #1 and will be solved at the same time or if it's an issue with the fact that the secondary language is hidden. Please let me know how it goes.

Here is the video of my intervention, I think it will be easier for you to understand: hidden link

January 23, 2024 at 10:47 am #15215708

filipC-6

Hello,

I've watched your video and did everything as you sadi - cleared server-side cache, and tried everything you did and it seems to be working on my side now!

The admin bar is also working on the Croatian version of the page, and the changes are seen when I clear the cache via the admin bar.

I guess that's it. Thanks for your help!