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.

Our next available supporter will start replying to tickets in about 0.71 hours from now. Thank you for your understanding.

This topic contains 9 replies, has 2 voices.

Last updated by Randolph 1 month, 2 weeks ago.

Assigned support staff: Lauren.

Author Posts
August 15, 2019 at 9:15 am #4399831

Randolph

I have a 2 language site, English and German. English is the default.

site.com/
site.com/contact/

site.com/de/
site.com/de/kontakt/

Now we would like to change the default to German, because we found there to be many more German visitors than English. If we do this, the URLs will change to:

site.com/
site.com/kontakt/

site.com/en/
site.com/en/contact/

If we do this:
1. Will people that have bookmarked "site.com/de/kontakt/" get redirected to "site.com/kontakt/"?
2. Does this negatively affect Google's indexing?

August 15, 2019 at 2:13 pm #4401465

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

You should not have any trouble with Google's indexing when you change the language, and everything should redirect automatically. Once in a while WordPress (not WPML) can act strange with guessing URLs. If that happens you can always set up redirects using a plugin or adding manually in the .htaccess file.

I hope this helps - let me know if you need further assistance and I'll be happy to help.

August 15, 2019 at 2:44 pm #4401797

Randolph

Alright, I went and made the change. All old "page" URLs 404'ed instead of redirecting.

August 15, 2019 at 3:32 pm #4402239

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

August 22, 2019 at 8:21 am #4437471

Randolph

What's the purpose of your request for access?

Is WPML supposed to redirect or not?

August 22, 2019 at 4:50 pm #4441661

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

It should redirect. I set up a fresh install with English as my default language and German as my secondary:

I created Sample Page at hidden link
I translated it to hidden link

Then, I switched the default language to German.
WHen I tried to load
hidden link
it correctly redirected me to
hidden link

Please feel free to use this staging site to try and reproduce the issue that you are seeing. You can install your theme/plugins as needed to try and replicate the problem, and I'll be happy to further troubleshoot.

Login: hidden link
Username: demo
Password: yImH03H6rB6m

August 28, 2019 at 2:17 pm #4475099

Randolph

I tested this on a fresh local install to exclude all the stuff on the site, and then on your sandbox: It's not working for me.

I changed the permalinks to "/blog/%postname%/".

I set / to be English and /de/ to be German, and added 2 translated pages.

1. hidden link
2. hidden link
3. hidden link
4. hidden link

Then changed / to be German, and /en/ to be English.

1. (A English) Now redirects to hidden link (A German), that's an incorrect redirect.
2. (B English) Now redirects to hidden link (B German), that's an incorrect redirect.
3. (A German) Now 404s.
4. (B German) Now 404s.

August 29, 2019 at 1:37 pm #4481421

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for the additional details. I'm checking with our developers to see what is the expected behavior, if this is considered a bug or something we can submit as a feature request. I will update here as soon as I have heard back. Thanks for your continued patience.

August 30, 2019 at 1:51 pm #4487559

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

After discussing further with our developers, it seems that auto redirecting will be an extra overhead for WPML to keep old URLs and send to new the ones for each request. It will be better performance wise for your site for you to write your own httacess rules and redirect the URLs.

However, please feel free to submit a feature request here and our developers can consider adding this in the future: https://wpml.org/suggest-a-new-feature-for-wpml/

September 4, 2019 at 9:28 am #4509677

Randolph

Ok. I'll go the htaccess route. Thank you for your help.