Skip to content Skip to sidebar

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

Last updated by erick-emmanuelE 1 week, 3 days ago.

Assisted by: Otto.

Author Posts
July 25, 2025 at 9:46 pm #17272114

erick-emmanuelE

Background of the issue:
I am trying to create and publish a page in Spanish at hidden link without any /en/ prefix, while using WPML’s 'different languages in directories' setting and Rank Math as my SEO plugin. I’ve disabled browser-language redirects, set Spanish as the default language, and enabled 'Use directory for default language.'

Symptoms:
WPML automatically prefixes /en/ on all new Spanish pages—even though the site language is set to Spanish and browser redirects are disabled. Rank Math shows the canonical and preview URL as hidden link, which doesn’t exist and redirects to /en. Google Search Console reports 'redirect error' and refuses to index the correct Spanish URL.

Questions:
How can I prevent WPML from adding the /en/ prefix to Spanish pages?
Why is Rank Math showing the wrong canonical URL?
How can I resolve the redirect error in Google Search Console?

July 28, 2025 at 2:22 pm #17275748

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I apologize for the delay in responding. I will take care of this ticket; the reply time will be shorter now.

I tried to go to:
hidden link

and got redirected to hidden link which is expected and hidden link does not exist.

I browsed the Spanish version of the site and didn't find any page with the /en/ prefix.

I also checked the hreflang tags and they look OK.

Did you manage to fix it? Or am I missing something? If so, can you please elaborate a bit to help me understand the issue?

Best Regards,
Otto

July 28, 2025 at 7:33 pm #17276626

erick-emmanuelE

Hi Otto,

Thank you for your response.

Unfortunately, the issue remains unresolved.

What you saw is the result of a manual redirection we had to create to prevent the /en/ version from being indexed by Google, since the real issue is that WPML is forcing all new pages into the /en/ folder, even when we clearly set them to be in Spanish.

For example, this was the original slug generated when we created a new page meant to be in Spanish:
hidden link
We had no way to change that default.

That’s why we manually redirected it to:
hidden link
…which is what you saw and assumed was working as expected.

But again, the core problem is not redirection.
We are asking for help to understand why WPML is defaulting to /en/ for every new page, even though we’ve configured the language and URL structure correctly — as shown in the screenshots previously attached.

This is currently hurting our indexation in Google. A consultant even suggested ditching WPML altogether, but we’d rather solve this with your help before considering such a drastic step.

Please help us identify what’s causing WPML to assign the wrong language folder by default.

Thanks in advance,

July 28, 2025 at 7:40 pm #17276634

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I would like to request temporary access to your site to take a better look at the issue.
It would be better to a testing site where the issue is replicated.

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.

**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.

Best Regards,
Otto

July 29, 2025 at 12:06 am #17276904

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I created a test page in Spanish (I made it private, only visible to admins). And the slug is OK (no "EN" prefix):
hidden link

I also checked the slugs of the other Spanish pages and they are also OK.

Can you please provide me with the steps I should perform to reproduce the problem?

Best Regards,
Otto

July 29, 2025 at 1:10 am #17276934

erick-emmanuelE

Hi and thanks again for your support.

I’d like to show you how the issue appears on our side, step by step:

Create a new page in Spanish.

Click “Edit with Elementor.”

Once inside Elementor, open the “SEO” settings tab (from Rank Math).

In the “slug” field, type any custom slug.

👉 As soon as you do this, you’ll see that WPML automatically adds the /en/ prefix to the URL — even if the page is meant to be in Spanish.

Problem Summary:
Because of this behavior, all our translated Spanish pages are getting the /en/ prefix, which causes major SEO issues. None of these Spanish pages are being indexed by Google, since Google expects a canonical version without redirections. But we’ve been forced to manually redirect them one by one after publication — as shown in the initial ticket evidence.

For example:

We manually created the page hidden link

But the slug generated in the backend was hidden link

Also, the English version of our homepage is not being indexed, likely for the same reason:

Our English home page is meant to be at hidden link

But WPML assigns the slug as hidden link

We've tried several different WPML settings and configurations to avoid this behavior but haven’t found a solution.

Please let me know if you need access again or if you’d like me to record a video walking you through the issue live.

Thanks again 🙏

July 29, 2025 at 2:24 am #17276957

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for the detailed explanation, but I still have doubts about how to reproduce it. So I accept your offer of recording a video :). Truly appreciate it.

Best Regards,
Otto

July 31, 2025 at 12:25 am #17283337

erick-emmanuelE

Hi Otto,

Thank you so much for your time and for setting up the test page.

It turns out the issue was actually related to how canonical slugs were being interpreted — specifically, whether or not there was a trailing slash at the end of the URL. Once we inspected the canonical version indexed by Google (with the trailing slash), everything worked perfectly.

Regarding the /en/ path shown when creating new pages: it seems that Rank Math is simply using it as an example format. Those new pages are not actually being created under the /en/ directory, as we originally assumed.

So there’s no action required on your end. Thanks again for your support and patience — it’s very much appreciated!

Best regards,
Erick