Skip Navigation

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

Problem:
The client is experiencing a 404 error when accessing the www version of their translated domain. The non-www version works correctly, but the www version redirects to an English 404 page instead of the correct language homepage.

Solution:
We recommend checking with the hosting support to ensure that both "https://www.titori.sk" and "https://titori.sk" are correctly configured on the server. This because WPML is set up to handle the domain titori.com with the configuration of "Different languages in directories", and the redirections from language folders to domain titori.sk are managed by a separate "301 Redirect" plugin.

If this solution does not seem relevant to your issue, 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 3 replies, has 2 voices.

Last updated by Marsel Nikolli 11 months, 1 week ago.

Assisted by: Marsel Nikolli.

Author Posts
December 13, 2023 at 3:22 pm #15056669

Lukas Bachleda

I have set the languages by different domains. When I try to directly enter the domain with translation, only nonwww version works. Www version return 404 error on native language, regardless the belonging language

Example:
enter hidden link - return English homepage - correct
enter hidden link - return Slovak homapage - correct
enter hidden link - return English 404 page - incorrect

December 13, 2023 at 4:45 pm #15057661

Marsel Nikolli

Hi,



Thank you for contacting WPML Support, I will be happy to help you.


I was able to check your website URL on the (hidden link), and I see there is a 301 redirection happening.

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

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

Status:	301 Moved Permanently
Code:	301
Server:	openresty
Date:	Wed, 13 Dec 2023 16:41:24 GMT
Content-Type:	text/html; charset=UTF-8
Content-Length:	0
Connection:	close
X-Redirect-By:	WordPress
Location:	<em><u>hidden link</u></em>
Cache-Control:	max-age=0
Expires:	Wed, 13 Dec 2023 16:41:24 GMT
Vary:	Accept-Encoding



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

> --------------------------------------------
> 200 OK
> --------------------------------------------

Status:	200 OK
Code:	200
Server:	openresty
Date:	Wed, 13 Dec 2023 16:41:24 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
Vary:	User-Agent,Accept-Encoding
Accept-Ranges:	bytes
Cache-Control:	max-age=0, public
Expires:	Wed, 13 Dec 2023 16:41:24 GMT
X-Powered-By:	WP Rocket/3.6.4

Could you please check if there is any redirect set on your website (I noticed you have a plugin "301 Redirects" installed from the debug information) and also try clearing the cache of your website (server side cache included).

After, check if the issue is still happening.

Let me know how it goes,
Marsel

December 13, 2023 at 7:38 pm #15058673

Lukas Bachleda

Hello, the 301 redirects has nothing to do with this issue.
It is because of first idea was to use WPML "by folder". When the project was almost done, the manager want to use different domains instead of folders. But the client has already some prints in thousands, with QR code, pointing to folder scheme.
So the 301 plugin redirects is only to redirect

titori.com/cz to titori.cz
and
titori.com/sk to titori.sk
so the desired language version is applicated.

In that plugin I am even unable to set the www versions of redirect: hidden link

So the problem is in WPML recognizing the www and nonwww version of different domain.

Thank you

December 14, 2023 at 8:58 am #15061603

Marsel Nikolli

Hi,

Thank you for the clarification of the situation.

As you shared in your reply, in your situation WPML handles only the domain titori.com with the respective language "folders" (titori.com/cz and titori.com/sk).

The redirections from the "folders" (titori.com/cz and titori.com/sk) are completely managed from the plugin "301 Redirect" you are using to redirect the respective language "folders" to the domains.

I would suggest you check with the hosting support to verify that "hidden link" and "hidden link" are correctly configured.

Let me know if you have any more questions.

Kind regards,
Marsel