Skip Navigation

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

Problem:
The client is experiencing issues with URL management on their website using WPML, where URLs unexpectedly show the language code 'pt-br' instead of 'pt'.
Solution:
We noticed that the client is using Portuguese with WPML, where the default language code is 'pt-br'. It's important to verify if 'pt' as a language code was ever configured or used on the website. We recommend checking for any settings or customizations that might have been altered to use 'pt' instead of 'pt-br'. Additionally, we suggest updating the Yoast SEO Premium plugin to the latest version, as it might influence URL behavior. If these steps do not resolve the issue, or if the problem described here seems outdated or not relevant to your current situation, please visit our known issues page at https://wpml.org/known-issues/ and confirm that you have installed the latest versions of themes and plugins. If the issue persists, we highly recommend opening a new support ticket for further assistance at WPML support forum.

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 5 replies, has 1 voice.

Last updated by danielH-157 1 day, 3 hours ago.

Assisted by: Andrey.

Author Posts
December 12, 2024 at 1:57 pm #16508097

danielH-157

Background of the issue:
I am trying to manage the URLs on my website, hidden link, using WPML. I noticed that some URLs have changed unexpectedly.

Symptoms:
There are a list of URLs that show changes in them. Instead of 'pt' in the URL, it is showing 'pt-br'.

Questions:
Why are my URLs showing 'pt-br' instead of 'pt'?
How can I revert the URLs back to 'pt'?

December 12, 2024 at 3:11 pm #16508565

Andrey
Supporter

Languages: English (English ) Russian (Русский )

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

While one of my teammates works on your ticket, I will provide you with initial debugging steps.

Where do you see the list of URLs where you have observed changes? Where can we see the issue on your website? Looking at your website, I do not see the problem, you have the correct links containing /pt-br/.

I have enabled debug information for this support ticket. Please refer to this link for instructions on how to retrieve this information from your site and share it with us: http://wpml.org/faq/provide-debug-information-faster-support/

December 12, 2024 at 4:13 pm #16508879

danielH-157

we have checked it from ahref and gogole search console
if you want i can share the list of it there are many urls that is been redirecting too

December 12, 2024 at 4:17 pm #16508883

danielH-157

hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link

these are the links that we got from ahref

December 12, 2024 at 5:03 pm #16509050

Andrey
Supporter

Languages: English (English ) Russian (Русский )

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

You are using Portuguese with WPML, where the language code is "pt-br" (for example, hidden link).

Why do you expect the URLs for Portuguese with the language code "pt"? It looks like it does not exist on your website.

I cannot explain why you are seeing these report links. Are these false positives? Opening several random links shows that there are no translations available in Portuguese.

I noticed that your Yoast SEO Premium needs to be updated to the latest version.

December 13, 2024 at 6:19 am #16509936

danielH-157

abdrey the issue was with the url pt-br now i have it to pt by adding custom language now and the yoast seo that we are using are upto date even we dont know why there are so many links that came up from ahref and gogole search console ill look into that