This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported an issue with mixed language search engine results pages (SERPs) being indexed, even after setting up the Multilingual SEO Plugin and configuring meta translations. The specific problem was with a URL parameter (?lang=de) that should not exist and does not function correctly, as it displays content in the wrong language.
Solution:
We recommend reaching out to the Rank Math team for assistance with the redirect issue, as it is beyond our control. Alternatively, you can seek help from a certified contractor who can set up the necessary redirect in the .htaccess file and troubleshoot why it is not working in the current server environment. Certified contractors can be found at https://wpml.org/contractors/.
In the meantime, using a redirection plugin as previously mentioned could provide a temporary fix for the problem.
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: Known issue
This topic contains 16 replies, has 2 voices.
Last updated by Marcel 1 year, 6 months ago.
Assisted by: Marcel.
Author | Posts |
---|---|
November 26, 2023 at 3:42 pm #14925243 | |
gerhardR-3 |
A while ago, I reported an issue where mixed language SERPs were indexed: I have since installed the Multilingual SEO Plugin, set the meta translations and waited but the Google SERPs are still mixed language, when searching for "free walking tour salzburg". This URL I mentioned in the original post also still exists: I use subdirectories for the multilingual setup. The settings are correct, and I have never used these kinds of parameters. This URL shouldn't even exist. When I add the same parameters to other WordPress sites, they show the homepage. My site shows a grid with 10 blog posts, and that site is indexed and shows in the serp almost every time. The language parameter also doesn't have any function since it indicates the page is in German but the page is in English. I narrowed the problem down a little by creating a staging site and disabling all plugins. When reactivating them individually, the URL becomes accessible when reactivating WPML. When WPML is deactivated, the URL with the parameter ?lang=de points to the homepage. There is no mention of hidden link anywhere in the database, and there are no other issues. I hope we can find a solution for this. I guess this causes the multilingual results in the Google Search. |
November 28, 2023 at 12:30 pm #14939237 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, this is an expected behaviour. The URL hidden link shows the post archive, like hidden link or hidden link, so basically every entered parameter will be loading the archive page. As you use the subdirectories, you can still access any language parameter, even if they are not existing or active. That is a default behaviour from WP. This doesn't mean that you activated the parameters anyway. You can see the same on our own webpage, too, as we also use language in folders: https://wpml.org/?lang=de (We also use /de) If this is disturbing you, you can prevent it by setting individual redirect routes and redirecting them to the endpoint via a regex, or you set a "noindex" for these specific URLs. Best Regards |
November 28, 2023 at 4:59 pm #14942923 | |
gerhardR-3 |
Thank you for the reply. I don't think it's expected behavior. Did you look at the other thread? You can see exactly what I mean from Nigel's screenshot in the other thread. It's a real problem because most of our guests are English-speaking, so they will first need to switch languages when clicking on a search result. I understand that the language parameter page being accessible is the desired behavior, but Google shouldn't index it, I guess. The example from the wpml website shows your actual blog page. For me the language parameter ending shows 10 random articles. I don't have the blog roll set to 10 posts anywhere. It's set to 6 posts. When I turn off wpml, I can still access the language parameter version, but it shows the home page. |
November 28, 2023 at 5:29 pm #14943291 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, yes, I checked your thread, but we are not telling Google what it should index and what not. You can easily prevent this with a rule. Our very own ?lang=de is, as an example, is also not indexed by the search engine. We can handle this as a feature request and let our developers decide if they want to prevent this or not. But first, we need to replicate it, as the WP URL auto-complete could be involved here. I wanted to replicate it from scratch, and I was not able to get the same output, only a 404: hidden link I tried using only WPML and with WPML, Kadence, Rank Math and our SEO Add-On. Do you have a staging environment where you can replicate it using only WPML? Best Regards |
November 28, 2023 at 6:36 pm #14943585 | |
gerhardR-3 |
Yes, I do. I just setup a new staging site. I can give you the login details. I remembered that I have not set a blog page in the WordPress settings. I use the parent category travel-guide as the main blog page. I tried setting a blog page in settings>reading and that page, once set, shows the same ten blog posts as the URL with the lang parameter. |
November 29, 2023 at 7:40 am #14946689 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi,
I tried both options on the Sandbox. I will isolate it on your staging to see the difference to the Sandbox. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. 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. Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you. IMPORTANT Best Regards |
November 30, 2023 at 3:28 pm #14964639 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, I can't reproduce it. ON localhost, I can get the same behaviour but without redirecting. hidden link It still returns the same index.php file from the TwentyTwenty-One theme, even if WPML is deactivated.
On your staging, there is no redirect to the homepage happening. I can still call any URL parameter I want: hidden link I can't confirm an issue from our side here. Can you confirm? Ps: Feel free to reply in German if you want. Best Regards |
December 1, 2023 at 3:58 pm #14974457 | |
gerhardR-3 |
Hello Marcel, thank you very much. English is fine with me. Yes, it shows the homepage when wpml is deactivated and the blogroll when wpml is activated. As soon as you activate wpml, you will get the 10 blogposts instead of the homepage when entering the site with the lang parameters. I guess the problem is that I don't use that blogroll but it's indexed on Google. Google doesn't seem to understand what language the website is in. If I set the search to English it still shows mostly German pages including the weird lang parameter page. It's a real problem because most of our visitors come for the primary language English and then need to switch to English from German before they can do anything. |
December 1, 2023 at 4:29 pm #14974669 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, thanks for the info. I will consult our developers and update you once I receive feedback. Best Regards |
December 4, 2023 at 12:07 pm #14986461 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, This is known to our developers, and it's planned to be changed in a future version of WPML. For now, please set a redirect from =?lang=de to the homepage with the help of a redirect plugin, and after some time, Google will change the URL from their index. Please find more details https://wpml.org/errata/language-parameter-on-the-page-results-in-blog-posts-being-shown/ Best Regards |
December 4, 2023 at 4:42 pm #14989829 | |
gerhardR-3 |
Hello Marcel, thank you for checking with the developers. It would be very important to fix this. The URL shows for me in every search for my main keyword. I am not sure what the impact on my SEO is but it can't be good. Would I redirect to the default (English) homepage? Because the URL is =?lang=de but the page it opens is the English blogroll. I am not sure if Google interprets it as a German URL and then gets confused by the English content and if that's the reason for the mixed results. |
December 4, 2023 at 4:48 pm #14989919 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, yes, redirect it to your English homepage. The source code and language HTML tags are still in English, so Google should not confuse anything here. Same if the parameter would be "sdsdsdsd", it's still considered English. Best Regards |
December 4, 2023 at 5:05 pm #14990201 | |
gerhardR-3 |
Thank you so much. I will go ahead and setup the redirect. |
December 4, 2023 at 6:43 pm #14990741 | |
gerhardR-3 |
I just tried to redirect the URL from freewalkingtoursalzburg.com/?lang=de to freewalkingtoursalzburg.com/ but it doesn't work. I tried setting up the redirect via RankMath and also via Sitegrounds redirects but it results in too many redirects. I have no idea why. There are no other redirects that would result in a chain or a loop. |
December 5, 2023 at 11:13 am #14995953 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, I recommend you use the "Redirection" plugin mentioned in the errata and only configure a redirect from the parameter "?lang=de", not the full absolute URL. If it gets in a loop, you can check the redirect route afterwards with hidden link. Best Regards |