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.

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by chongweiC 1 year, 10 months ago.

Assisted by: Prosenjit Barman.

Author Posts
April 26, 2023 at 2:10 pm #13541985

chongweiC

Hi,

On my site, the default language is English.

Then I set one post language to Chinese Simplified. Then I find its URL contains /zh-Hans/, as below:

hidden link

But there is not English translation for this post. In such a case, what will be for the URL below:

hidden link

I test and find it will load the Chinese Simplified version of the post. Is this by design? I mean if visit the default URL without the language code, and there is only one language available for that post, then that post will be loaded even its language is not the default language?

April 26, 2023 at 4:47 pm #13543577

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for contacting us.

If you check better hidden link you'll see it redirects to hidden link
so it's not like it still show Chinese despite being in English.

This is the default behavior. The URL hidden link won't appear anywhere (there's no language switcher pointing to it, and therefore Google won't even index it) so it's unlikely someone would type it by mistake

April 27, 2023 at 2:21 am #13545707

chongweiC

So, you will create a redirect automatically to redirect a non-language URL(hidden link) to the first available language URL(hidden link) if the default language post does not exist?

Where can I see and manage the redirect?

April 28, 2023 at 1:54 pm #13557967

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for reaching out to us. I will try my best to address your concerns.

In addition to what my colleague Laura explained, In case of a URL that does not exist or is incomplete, WordPress has a built-in redirection feature that can redirect them to the closest existing URL or suggest relevant content that matches the URL without causing an error or losing traffic. This feature is useful for maintaining the user experience and keeping the visitors engaged with the website.

In your case, the same is also happening. As this post(hidden link) is not available, the WP Redirection is redirecting to the URL close to it, which is the post you've created in Chinese(hidden link).

The redirection is solely managed by WordPress. If you want to change it, you can do that by using a Redirection plugin such as "Redirection".

I hope I'm able to clarify it for you. But, let me know if there is anything else I can help you with.

Best Regards,
Prosenjit