Skip to content Skip to sidebar

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

Problem:
The client is attempting to configure WPML to use different domains or URLs for each language on their WordPress site. However, when activating a domain per language and changing the language on the selector, the URL changes but the language does not. Additionally, there is a redirect loop preventing access to the site.
Solution:
First, ensure that the DNS settings for each domain are correctly pointing to the same WordPress installation. Next, verify that the WPML settings for using different domains per language are correctly configured. This involves setting up WPML to recognize each domain as a different language endpoint. If there is a redirect loop, it's essential to check the .htaccess file or the server configuration for any incorrect redirection rules that might be causing the loop. Removing or correcting these rules should resolve the issue.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/.

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 0 voices.

Last updated by Marcel 1 month, 2 weeks ago.

Assisted by: Marcel.

Author Posts
September 26, 2025 at 9:18 am #17435131

fredericoB-3

Background of the issue:
I am trying to use a different domain or URL per language for my WordPress site. I want to use FOOD4FITNES.PT for Portuguese, FOOD4FITNESS.ES for Spanish, and en.food4fitness.pt for the English version.

Symptoms:
When i activate a domain per language and i change the language on the selector it changes the url but doesnt not change the language.
I have tried several methods but cannot make this work.

Questions:
How can I configure WPML to use different domains or URLs for each language?

September 26, 2025 at 2:26 pm #17436379

Marcel
Supporter

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

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

Hi,

dince the Multi-Domain feature is currently deactivated, I’m unable to test the error.

The best approach would be to set up a staging environment and connect your real domains to the test instance. That way, we can accurately simulate the exact behavior.

Best regards,
Marcel

September 27, 2025 at 11:40 am #17437962

fredericoB-3

I dont a staging site. I already sent you the admin login detais to the other support ticket i have created.

September 29, 2025 at 7:37 am #17439788

Marcel
Supporter

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

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

Hi,

as mentioned, the Multi-Domain option is not active on this hidden link">settings page.

Because of this, there’s nothing I can test at the moment. Please either:
- Set up a test environment so I can run the necessary checks, or
- Change the domain setting on the live environment yourself and let me know once I can reproduce/test the issue.

Best regards,
Marcel

September 29, 2025 at 7:48 am #17439802

fredericoB-3

I just activated the "Domain per language" option. I had deactivated it because I can't get it to work properly.

September 29, 2025 at 8:37 am #17439961

Marcel
Supporter

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

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

Thanks! At the moment, when you switch languages, a 301 redirect is triggered. For example, clicking on the English flag causes this redirect.

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 29 Sep 2025 08:22:08 GMT
Content-Type:	text/plain
Content-Length:	24
Connection:	close
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

As you can see, the redirect sends you back to the main domain. When you try to save the Multi-Domain option, English isn’t stored correctly and instead shows “Não válido.” For Spanish, the product page returns a 404 error, since there’s also an active redirect pointing to the main domain.

HTTP Headers
>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 29 Sep 2025 08:32:13 GMT
Content-Type:	text/html; charset=iso-8859-1
Content-Length:	236
Connection:	close
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

It looks like the additional domain was set up with a redirect instead of pointing to the same root directory. You’ll need to review the DNS settings for this configuration. The best approach is to contact your hosting provider for assistance, as each hoster handles this differently.

Best Regards,
Marcel

September 29, 2025 at 10:21 am #17440466

fredericoB-3

The issue with food4fitness.es its solved now. Can you check why its not working?

September 29, 2025 at 10:36 am #17440530

Marcel
Supporter

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

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

Hi,

right now, I even can't access hidden link anymore. What was changed? There is now a redirect Loop:

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 29 Sep 2025 10:33:44 GMT
Content-Type:	text/html; charset=iso-8859-1
Content-Length:	236
Connection:	close
Location:	<em><u>hidden link</u></em>
Host-Header:	6b7412fb82ca5edfd0917e3957f05d89

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 29 Sep 2025 10:33:45 GMT
Content-Type:	text/html; charset=UTF-8
Content-Length:	0
Connection:	close
X-Cache-Enabled:	True
X-Content-Type-Options:	nosniff
X-XSS-Protection:	1; mode=block
X-Redirect-By:	WordPress
Location:	<em><u>hidden link</u></em>
X-Httpd-Modphp:	1
Host-Header:	6b7412fb82ca5edfd0917e3957f05d89

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 29 Sep 2025 10:33:46 GMT
Content-Type:	text/html; charset=iso-8859-1
Content-Length:	236
Connection:	close
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

Best Regards,
Marcel