[Resolved] transfer between /sv /en and /fr on the landing page
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing a slow redirection to the correct language version of their website based on the visitor's IP address. They were concerned about the SEO impact and the user experience due to the delay in loading the correct language page.
Solution: We informed the client that WPML supports browser language redirection but not IP-based redirection. We provided a link to our documentation on browser language redirect: https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/. We recommended the following debugging steps: 1. Back up the website and database. 2. Deactivate all plugins except WPML and its addons to check for the issue. 3. Reactivate each plugin one by one to identify any conflicts. 4. If the problem persists, repeat the steps with a default WordPress theme. We also offered to set up a test site on our Cloudways servers for further investigation if needed.
In a follow-up, the client mentioned they found a solution using the IP2Location plugin and asked about flashes on the site when navigating without a cache plugin. We suggested that the flashes might be due to the lack of caching and recommended checking with their hosting provider about enabling the bcmath PHP extension to improve performance.
If the provided solution is not relevant due to being outdated or not applicable to your case, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us through the WPML support forum: https://wpml.org/forums/forum/english-support/.
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.
When you access the 3 language hidden link site it will automatically search for the /sv extension since Swedish is the master language. If I've understood it right, WPML checks the IP-address of the visitor and then changes the language as follows :
Sweden => /sv
French => /fr
Other countries => /en
This switch seems to work, but it's very slow and the Swedish landing page remains too long for visitors coming from elsewhere. It could appear the site is just Swedish. Also, I'm concerned about the SEO impact on this.
Is this long delay normal and if not, how can I speed up the time for checking the IP-address and display the correct language faster ? I have the impression it was much faster when I launched the site.
To experience the problem, you just have to visit hidden link
If you're using the browser based redirection as mentioned in the guide, would you please try the following to check for the issue?
IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.
- Deactivate all plugins except WPML and its addons and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, repeat the above steps with a default theme of WordPress (i.e. 2021 or 2024).
Please let me know and I'll try my best to help you further on the matter.
Thank you for your reply and excuse me for my late reply. I haven't been able to try your proposal since it's a bit tricky, long and should rather be done night time when there's low traffic.
However, today I found a very obvious example that explains something is wrong with the WPML on our site. I'm not sure what I found is linked to the initial question above, but I write it here anyhow instead of opening a new ticket :
If you type "Domaine Colbois" in google, there are 14 results in French appearing before us. We appear on 15th place... in English.. I'm located in France so I don't know if you can recreate the issue so I attach a photo below. From what I can read, WPML should handle the Hreflang automatically. Why am I then having the English page indexed by google and displayed in France ?
PS. The page is translated into French and activated.
I am little skeptic about it, since we're not sure about the original issue you reported.
In theory, the redirection issue may have to do something with it too, like slow redirection as you mentioned earlier. So I am not sure how Google in France would look at this, when the landing page stays longer than it 'd wait for any suspected redirection (to actual local language - i.e. French in this case).
In short, if you don't want to report it separately, let's just focus on the original problem first. And see if that helps with this one too or not.
Please take your time and let me know your findings based on my previous message.
Thanks for your reply. However, I'm not that satisfied with the reply. The site's master language is Swedish and from the first message I sent, the landing page remains too long in Swedish before switching to the local country language (in my case French).
The second issue, is that the site displays the English product page in the google ranking instead of the French when being in France. The Swedish landing page has nothing to do with it and it's up to the site to give google clear instructions which language to display. My site is not doing that correctly and my translation plugin is WPML.
In summaty, I can of course create a separate ticket for the second question, I think I'll probably do this since I don't think the 2 question are in relation. I think I have a general mess with the WPML and I don't know why. The reason why I say this is that I'm not at all satisfied with the google ranking on many key words I should rank much better on. The Yoast requirements are perfectly filled up for each page and each language on the site and competition wisely, our site is stronger than others that are ranking better. However, if I display the wrong language to google it's normal that I'll have problems with ranking...
For the first question, I'm not using any strange plugin and I think it's unlucky that I'll have to spend hours to check if there are incompatibilities beween the plugins. I'd hoped that was included in WPML to be compatible with the most downloaded currecy and country switcher plugins.
Besides this, I mentioned some initial debugging steps in my first reply. These are our standard debugging steps which are usually based on your debug information.
Since there are so many plugins active, we're not sure which one may be causing the problem.
Your theme is also not on our compatibility list, which can also be a player in this.
Anyhow, if you don't have a staging/dev site, I can arrange for a test site in our Cloudways servers. You can then migrate (copy) your site there and we can check about the issue (delayed redirection). This way your site live site 'll not be compromised.
However, please note, that these debugging steps take time (as you've noted earlier), the turn out time may be longer due to current load of work. This is why we requested you to have it on your end and let us know to pick from where the problem actually starts.
I have now changed the settings to "Disable browser language redirect". I immediately have the correct language displayed in the Google-ranking. The ranking has improved and the traffic has risen for the 5th day in a row. It shows up that I probably had bad performance for years due to a setting issue in WPML.
However, when searching directly on the website name => ivinio.com, the page now displays only in Swedish (the master langauge) since the automatic browser redirect has been inactivated. I have 2 questions :
1. I read on your site that you recommend 3 geotargeting plugins. However, they won't work with a cache plugin which will reduce speed of the site, that google will punish.... Furtheron, I receive the following pop-up when trying to install the plugin. Do you know why and how to correct that?
2. If I don't install the geotargeting plugin, will Google understand from experience that he's displaying the wrong landing page and correct it automatically? Which means I just have to be patient?
In summary, I think this is very complicated for a vital point in international e-commerce. I've first was so impressed by the change of impact for so little change, that I even asked myself if maybe WordPress is not the right platform for multilingual sites. This should be much more precise and straightforward in my opinion year 2024.
I finally think I found a solution. I managed to install the IP2location and also managed to make it work => redirect to the right landing page. However, when desactivating the cache plugin, I have strange flashes appearing on the site when navigating, as if there was a millisecond of general blocking. That should rather be a problem to handle with the IP2location, unless you didn't hear about this elsewhere? If not I think this ticket could be closed.
Thank you for the updates and glad you found a workable solution.
I am not sure about those millisecond flashes of general blocking, perhaps that's a drawback of deactivating cache (i.e. the overall request waiting a response and switching to the right page). But as you noted using caches with such redirection plugins isn't recommended.
About that notice on IP2Location plugin (the screenshot in your previous message), to enable bcmath PHP extension, you can check with your host and see if it helps improving the performance.