Skip Navigation

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

Last updated by marioS-49 4 days, 7 hours ago.

Assisted by: Marcel.

Author Posts
April 2, 2025 at 5:36 pm #16888308

marioS-49

Background of the issue:
I am trying to set up my WordPress site using WPML to have the English version on a separate domain. My main domain is hidden link and I want the English site on hidden link.

Symptoms:
When I click on the language switcher in the menu, it doesn't switch to the English site. However, when I hover over the 'English' link, it shows the proper link at the bottom of the browser (google chrome).

Questions:
Why doesn't the language switcher switch to the English URL when clicked?
Is there a specific configuration needed in WPML to use separate domains for different languages?

April 3, 2025 at 4:04 pm #16893873

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

The domain should point to the same root folder as your main domain. Currently, it’s being redirected via a 301 redirect, which isn’t the desired setup.

To verify the correct configuration, you can place a simple test.txt file in the root directory. If you’re able to access that file through both domains, then everything is set up correctly.

If you need assistance adjusting your DNS settings, I recommend reaching out to your hosting provider for support.

Best regards,
Marcel

April 3, 2025 at 4:27 pm #16894073

marioS-49

Thanks Marcel

I added a test.txt file and can access it on both domains

hidden link
hidden link

April 3, 2025 at 4:39 pm #16894226

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

so you just need to remove the 301 redirect and add the domain in WPML, so the root of the domain loads correctly and displays content.

Right now, the main domain still has the redirect:

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

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

Status:	301 Moved Permanently
Code:	301
Date:	Thu, 03 Apr 2025 16:37:24 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
Server:	cloudflare

Best Regards,
Marcel

April 4, 2025 at 2:32 pm #16898031

marioS-49

Hey I found the solution.

The website has to have its own cPanel account. As the secondary domain needs to be an alias and not an addon domain.

This is achieved by selecting the "share document root folder" setting for the secondary domain. You can't have the domain direct to a single folder (which you would do if you were hosting multiple websites using a single cPanel account).

I could not find this answer in any thread about this issue, so hopefully this can shed some light for others.

Screen Shot 2025-04-04 at 9.29.24 AM.png