Skip to content Skip to sidebar

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

Problem:
You have a page on your multilingual site that should not have a language subdirectory in its URL, but currently, it loads with one (e.g., https://mysite.tld/en/page/). You want it to load directly at https://mysite.tld/page/ without language subdirectories and without translations for other languages.
Solution:
To address this issue, you will need a custom solution tailored to your specific setup. Here are some possible approaches:
1. Create a server rule that ensures the page always uses a fixed URL, which might include redirecting or proxying to the actual WordPress page.
2. Write PHP code that detects the special page slug and bypasses the language folder logic for that particular request.
3. Set up a "dummy" translation for other languages that simply redirects back to the default version.
The best solution will depend on your hosting environment and project requirements.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking the related 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 open a new support ticket.

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 9 replies, has 0 voices.

Last updated by Fabio Fava 12 hours ago.

Assisted by: Marcel.

Author Posts
September 14, 2025 at 10:01 pm #17400380

Fabio Fava

Background of the issue:
My site uses languages in subdirectories, but I have one page (access to an external service inside my site) which doesn't have languages. It now loads from hidden link but I'd like it to load at hidden link and it doesn't have translations to the other languages.

Symptoms:
Couldn't find any relevant documentation to reach this result.

Questions:
Is there a way to have a page without language subdirectory in WPML?

September 15, 2025 at 5:33 am #17400651

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

If you’re using the language folder for your default language, there’s unfortunately no built-in way to achieve this by default.

You may need to create a custom solution with rewrite rules or simply create the page and redirect the translated version to your default page.

Best regards,
Marcel

September 18, 2025 at 3:04 am #17411561

Fabio Fava

Hello Marcel,

What would be that "custom solution"? Any clue? I'm not a programmer, so I don't know how to create rewrite rules and all that. My site is hosted on Nginx.

I'll keep looking forward from you on that, thank you very much

September 18, 2025 at 12:21 pm #17413334

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

A possible custom approach could involve fetching the URL, retrieving its translated ID, and then programmatically setting rewrite rules that bypass all validations for that specific case or setting hard-coded URLs as a rule.

However, I recommend reaching out to a freelancer, as we are unable to develop custom solutions under our support policy—especially when the requested functionality is not an issue with WPML itself and differs from the way WPML is designed to work.

Best regards,
Marcel

September 21, 2025 at 10:45 pm #17419530

Fabio Fava

Hey Marcel, thank you for the informations,

Before I reach out to a freelancer, I'd need to know what is specifically what I have to do: should I add some Nginx Rules to rewrite hidden link to hidden link ?

My hosting team may be able to do that to me, I'd need just to confirm what I actually need them to do. The /wp-login.php URL (on my site is masked to /flyin/) doesn't load from the languages virtual folders (/en/ or /br/ in example).

Please just confirm that to me, so I can ask them if they can do that.

Thank you once again and best regards!

September 22, 2025 at 8:43 am #17420427

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

to achieve this, you’ll need a custom solution tailored to your installation. A freelancer/developer can review your setup and recommend the best approach. Some possible directions include:

- Creating a server rule, so the page always uses a fixed URL and optionally redirects or proxies to the actual WordPress page.

- Writing PHP code that detects the special page slug and bypasses the language folder logic for that request.

- Setting up a “dummy” translation for other languages that simply redirects back to the default version.

Which solution works best will depend on your hosting environment and project requirements.

Best regards,
Marcel

September 23, 2025 at 4:23 pm #17426405

Fabio Fava

Hey Marcel, thank you very much for the directions.

I wonder if a solution could be used in some way:

1) Create a Root Page as it was the Home Page;
2) Define other page (the real Home page) to be the Home Page.
3) Define that page at The Hub Client (/hub/) so to not have it at /en/hub/;

Do you think it will be viable to try it out? Or won't work fot that pourpose?

September 23, 2025 at 4:40 pm #17426423

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

Unfortunately, that setup won’t work. WPML can’t exclude a single page from language directories. To use a root page, you need to enable the Different languages in directories option. Saving it without can cause issues.

Best regards,
Marcel

September 30, 2025 at 3:12 pm #17445601

Fabio Fava

Hey Marcel,

I actually have Languages in Directories:

/en/ - English
/br/ - Brazilian Portuguese
/es/ - Spanish
/fr/ - French

I currently use the "home.html" page suggested by WPML, and it's working. Just having some issues with the SEO Plugin (SmartCrawl from WPMU DEV), wich gets confused with the redirect on that page.

Do you think in this case, I could do the solution I've proposed above? I'd remove "home.html" page from the WP root folder, create a Root page and set it as The Hub page (/hub/). Then define the page I want to be the Home Page, as the Home Page at WordPress Settings... Would work this way?

I'll keep looking forward from you, thanks!

September 30, 2025 at 4:19 pm #17445780

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

Sorry, I had an error in my previous response. I meant the “Use directory for default language” option in WPML.

If this option is enabled, the default language will always include the folder (e.g. /en/page). It’s not possible to make exceptions for just one page.

If this option is disabled, the default language will be served without a folder (e.g. /page). However, if you are using the root (/) as your main page, this option needs to stay enabled, otherwise it can cause issues.

Best Regards,
Marcel

October 3, 2025 at 11:21 am #17454174

Fabio Fava

Understood. Not resolved, but explained.

The solution would be to disable main language in directory (and remove the home.html page at the WP root folder). This would probably also solve the SEO issue it causes.

Thank you very much and best regards!