Skip Navigation

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

Problem:
The client was experiencing an issue where the default language (English) homepage was redirecting to a specific slug instead of the root URL. Other language homepages were working correctly. The client had already unchecked 'Use directory for default language' in WPML settings, resaved permalinks, and disabled the Redirection plugin. The default language had been switched from French to English.

Solution:
1. We suggested clearing the cache on the server-side and any CDN services like Cloudflare.
2. We advised checking the homepage settings in WordPress (WP-Admin -> Settings -> Reading) to ensure the correct page was set as the homepage.
3. We asked the client to check for any redirection rules in the .htaccess file and any configurations in the Redirect plugin.
4. We inquired if the site URL was defined in the wp-config.php file, as the WordPress Address and Site Address options were disabled in the General Settings.
5. We recommended disabling all non-WPML related plugins, switching to a default WordPress theme, and checking if the issue persisted to determine if it was a theme or plugin conflict.

Ultimately, the client discovered that the issue was not related to WPML but was due to the theme settings, where the fields for setting the Frontpage and Blog page had been emptied.

If this solution doesn't look 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 8 replies, has 2 voices.

Last updated by Marsel Nikolli 1 year, 6 months ago.

Assisted by: Marsel Nikolli.

Author Posts
January 8, 2024 at 12:07 pm #15160183

julienM-21

Hi
I have an issue with homepage URL since I am working on WPML: the default language (EN) Homepage redirects to hidden link
Other languages Homepages are fine (www.mydomain.com/fr/, hidden link, etc.)

The WPML languages URL format settings are on
"Different languages in directories"
"Use directory for default language" is UNchecked
Permalinks have been resaved (multiple times)

Please note that default language used to be French and is now English (maybe it can help explain the issue).

Please advise.

January 8, 2024 at 12:53 pm #15160453

Marsel Nikolli

Hi,



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


I noticed from the debug info that you are using LiteSpeed server, which is great for cache but at the same time could cause issues like this one.

Could you please try clearing the cache of the website on the server-side and from any CDN you might have in use (like Cloudflare, etc.) and check if the issue persists?

Also, please check the settings for your homepage in the WordPress dashboard. Go to WP-Admin -> Settings -> Reading and make sure the correct page is selected as the homepage.

Regards,
Marsel

January 8, 2024 at 1:01 pm #15160523

julienM-21

Hello Marsel
Thank you for your reply. LiteSpeed is actually disabled on the staging website. I have flushed the cache on server side, just in case, but the issue remains.

January 8, 2024 at 1:28 pm #15160604

Marsel Nikolli

Could you check if there is any configuration set on the Redirect plugin?

Also, can you check if there might be any redirection rule on the .htaccess file?

* Is there any way I can preview the staging site, as I redirects me to the login page when I try to check out its front-end?

January 8, 2024 at 2:29 pm #15160933

julienM-21

I have disabled Redirection plugin and checked .htaccess file.

How can I provide access privately? I recall having specific fields for this enabled by WPML support team.

January 8, 2024 at 2:32 pm #15160940

Marsel Nikolli

I've set your next reply as private so you can provide the website access details.
You should be able to see the specific fields.

January 8, 2024 at 3:38 pm #15161466

Marsel Nikolli

Thanks for providing the access.

1) I've checked the staging website on hidden link and I noticed a 301 redirect from hidden link to hidden link

* I was not able to access the FTP account though to further check.

2) Could you please check if there is any site URL defined in the wp-config.php file?

Form WP-Admin -> settings -> General the "WordPress Address (URL)" and "Site Address (URL)" seem to be disabled which means that the site URL might be configured somewhere else.

January 8, 2024 at 3:53 pm #15161583

julienM-21

Sorry, I just updated the host with IP address, it will work now.

1) Yes, this is the issue I am tracking.
2) WP_HOME and WP_SITEURL in wp-configs.com are root url hidden link, as seen in General Settings.

You think the redirection does not come from WPML?

January 8, 2024 at 4:05 pm #15161794

Marsel Nikolli

Thanks for updating the FTP.

I checked as well with a browser extention and as you can see in the image attached the redirect seems to come from WordPress itself (x-redirect-by), and I think there might be some cache mechanism on the server that might affect it.

Could you try checking if the issue happens in a minimal setup, disable all non-WPML related plugins (including the ACF/ACFM), set a default WP theme and check if the issue persists?

LinkResearchTools-Link-Redirect-Trace-20240108-162708-staging_edgarsuites_com-.png
January 9, 2024 at 9:51 am #15163680

julienM-21

Hi Marsel
Your messages pointed me to the right direction. WPML was indeed not involved, the issue was on the heme settings, which have fields to set Frontpage and Blog page, and those settings had been emptied somehow.
All good now.
Many thanks