Skip to content Skip to sidebar

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

Problem:
The client is trying to set up Spanish and Dutch translations for their website using separate domains, but the domains are being marked as 'not valid' despite being set up as aliases and not redirects.

Solution:
1. We suggested that the error might be a false positive and recommended saving the settings without the validation option and then visiting the translation to see if it works.
2. We advised the client to check their

wp-config.php

file for entries that define home and site URLs dynamically, which could cause false positives, and to comment them out if present.
3. We identified that the issue might be related to DNS setup or specific settings with the client's web host, One.com, and recommended contacting their support for assistance.
4. We also suggested adding the .es domain to the DNS settings of the .nl domain, as it was not included in the screenshots provided by the client.
5. After testing the client's site on a virtual server, we confirmed that there were no issues with the theme or plugins, and reiterated the need for the client to contact their hosting support and domain providers for help with DNS settings.

If the solution provided here is not relevant to your case, either because it's outdated or not applicable, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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

Last updated by Andreas W. 1 year, 4 months ago.

Assisted by: Andreas W..

Author Posts
February 8, 2024 at 3:18 pm #15281971

priyaP

Tell us what you are trying to do?

Hi, I am trying to set up Spanish and Dutch translations for hidden link, using separate domains (www.mjseventservices.es & hidden link). I have followed your documentation regarding setting up domain aliases for these, but they are still being marked as 'not valid' (see image). I've double-checked that they are in fact aliases and not redirects, so I'm not sure what the issue is.

Is there any documentation that you are following?

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

Is there a similar example that we can see?

https://wpml.org/forums/topic/a-different-domain-per-language-not-valid/

What is the link to your site?

hidden link

Any help is much appreciated.

Screenshot 2024-02-08 150915.png
February 8, 2024 at 3:24 pm #15281991

George Botsev
WPML Supporter since 02/2014

Languages: English (English )

Timezone: Europe/Sofia (GMT+03:00)

Hello and thank you for contacting us!
The error could be a false positive.

Try to save without the validation option and visit the translation - if it works then it should be
okay.

Some entries in wp-config.php could cause these false positives to appear.
For example defining home and site URLs like this:

    define( 'WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] );
    define( 'WP_HOME',    $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] );

if you have some of those - comment them out.

February 9, 2024 at 10:11 am #15285054

priyaP

Hi George,

I've tried saving without the validation but it didn't seem to work. When I switch languages it displays the correct domain but the page is still in English.

It might be worth mentioning the site uses Elementor, could that have anything to do with the issue?

February 9, 2024 at 10:41 pm #15287805

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

This looks like an issue with your DNS-Setup and I would like to ask you to first contact the hosting support, explain the issue, and then review it.

If they can not confirm any issue on their end, then I will be glad to offer you to take a closer look at your site.

Best regards
Andreas

February 12, 2024 at 9:58 am #15291964

priyaP

Hi, I've been in contact with the hosting company but they're confident the DNS settings have been set up correctly and there aren't any issues on their end. Here's how the web alias for the .nl DNS settings is configured if that helps:

Screenshot 2024-02-12 095630.png
February 13, 2024 at 10:57 am #15296890

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

February 15, 2024 at 3:10 pm #15308198

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I have enabled "Different Domains per language" again while having the "Validate on save" option disabled.

I can now actually reach the homepage in the second domain in ES and NL by using the browser address bar, but for some reason, the translations are not showing up.

Also, the language switcher appears to not work as expected.

I will need to take a copy of the site to test it on a virtual server and I will get back to you once I am done with this task.

---

Further, I changed the WP MEMORY LIMIT inside the wp-config.php file to 256M as the site was using the default of 40M and was running close to the limit.

Further, I made sure that your users have a first name and last name inside their profile, as this is necessary to use the Advanced Translation Editor.

February 15, 2024 at 9:22 pm #15309517

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I took a copy of your installed it on localhost while using the hosts file of my system to emulate subdomains for NL and ES.

I can not confirm any issue with this setup, as you can see on the screenshots.

I would suggest you reach out again to your hosting support, as there still seems to be an issue with the DNS setup.

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

test domains.png
Captura de pantalla 2024-02-15 162027.png
test nl.png
February 21, 2024 at 4:21 pm #15329345

priyaP

Hi, thanks for looking into this. I have reached out to my hosting company and they told me to change the web alias to a web forward, but that didn't fix the issue.

I'd really appreciate if you could take another look and share any more details you can as my client needs these translations live as soon as possible.

Many thanks,

Toby

February 21, 2024 at 5:16 pm #15329693

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello Toby,

Usually, as I took a copy of your site which worked as expected on a virtual server, it is confirmed that there is not any error or config issue inside WordPress.

The issue most likely would be the DNS setup or specific One.com Settings and we do not have any influence on this.

If the DNS settings are fine, then the issue could be the following entry inside your wp-config.php file which was created by One.com:

/**
 * Client IP for One.com logs
 */
if (getenv('HTTP_CLIENT_IP')){$_SERVER['ONECOM_CLIENT_IP'] = @getenv('HTTP_CLIENT_IP');}
else if(getenv('REMOTE_ADDR')){$_SERVER['ONECOM_CLIENT_IP'] = @getenv('REMOTE_ADDR');}
else{$_SERVER['ONECOM_CLIENT_IP']='0.0.0.0';}

Could you please ask the One.com Support if it would be safe to remove those entries for testing purposes? Explain to them that you need to use different domains per language on your site and it appears not to work for some reason if the site runs on One.com.

Best regards
Andreas

February 26, 2024 at 12:43 pm #15344330

priyaP

Hi Andreas,

Thanks for the additional info, I passed this on to one.com who have looked at this thread and have had their senior technicians look at the issue.

Regarding the code you mentioned, they said it 'should not impact any plugin functionality typically', and to ask you to check why you think it's affecting the plugin.

Following this, they had a closer look but 'didn’t get any clue what issues we have in our DNS setup that WPML support is claiming', and wondered if you have any more specific information you could provide.

If there's anything else you can look into based on this, I'd really appreciate the support.

Thanks again,

Toby

February 27, 2024 at 1:16 pm #15349218

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello Toby,

For the question from One.com I would like to point you to the comment form our Second Tier Support here:
https://wpml.org/forums/topic/unable-to-set-up-different-domains-per-language/#post-15281991

I would like to offer to take a copy of your site and test it on a virtual server with different domains.

Once I am done with this task, I will reach out to you again.

Best regards
Andreas

February 27, 2024 at 8:34 pm #15351304

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

I am trying to create a copy of your site for testing, but the download from your server is getting canceled all the time.

I will keep trying.

A question:

In the screenshot on this comment above you show the DNS Config for the NL and UK parts of the website:
https://wpml.org/forums/topic/unable-to-set-up-different-domains-per-language/#post-15291964

Did you create a similar config for NL and ES?

I am asking, as the UK version works as expected here and the issue with the ES domain.

Best regards
Andreas

February 27, 2024 at 8:38 pm #15351310

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

My apologies, but the download of your site's package is getting canceled every 5 seconds.

Please read my prior config and send me screenshots of your complete DNS setup.

February 28, 2024 at 2:58 pm #15354445

priyaP

Hi Andreas,

Sorry I'm not sure why the download is being cancelled.

To clarify how it's currently configured, I've attached screenshots of the DNS settings for all three domains.

With using web forwards instead of web aliases, both domains are marked as 'Valid', but the domains just redirect to the UK domain.

When we used web aliases instead, both domains were marked as 'Invalid' but the translations didn't show up either.

I hope this helps but let me know if you need any more information.

Many thanks,

Toby

.nl-DNS-Settings.png
.es-DNS-Settings.png
.co.uk-DNS-Settings.png