Skip Navigation

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

Problem:
The client is trying to generate separate sitemaps for each language on their site using WPML Multilingual CMS, WPML String Translation, and Yoast SEO, with the URL format set to different languages in directories. However, they encountered an issue where all URLs for every language are combined into a single sitemap, and duplicate URLs appear in the page-sitemap.xml.
Solution:
We explained that the current setup with WPML and Yoast SEO inherently generates one sitemap for all languages, which includes URLs from all languages. To achieve separate sitemaps for each language, the client would need to switch to the domain per language mode. This setup allows for individual sitemaps per language domain. For more details on how to implement this, we recommend visiting the following documentation:

If this solution does not apply to your case, or if it seems outdated, we 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. Should you need further assistance, please do not hesitate to open a new support ticket 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 3 replies, has 1 voice.

Last updated by jiwoongh 1 week, 4 days ago.

Assisted by: Dražen.

Author Posts
November 28, 2024 at 5:33 am #16452292

jiwoongh

Background of the issue:
I am trying to generate the sitemap_index.xml separately for each language on my site hidden link. I have WPML Multilingual CMS, WPML String Translation, and Yoast SEO installed. My site has English as the default language, with Japanese and Korean as additional languages. The URL format is set to different languages in directories.

Symptoms:
After applying these settings, I encountered an issue where duplicate URLs appear in the page-sitemap.xml.
Actions Taken:
Installed the WPML SEO plugin.
Flushed the cache.
However, the sitemap is still not separated by language, and all URLs for every language are combined into a single sitemap.

Questions:
How can I display sitemaps separately for each language after installing WPML SEO?

November 28, 2024 at 7:37 am #16453222

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

I am afraid that is expected and the only way to achieve have different sitemap per language is when using the language per domain option.

- https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/#translate-sitemaps
- https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

Regards,
Drazen

November 29, 2024 at 3:06 am #16457406

jiwoongh

The site is structured with language-specific URLs:
hidden link
hidden link
hidden link

I want the sitemap to be generated per language while maintaining the "Different languages in directories" setting:
hidden link
hidden link
hidden link

1. With WPML Multilingual CMS, WPML String Translation, and Yoast SEO installed:
hidden link
hidden link
hidden link
The sitemap is generated per language, but there is an issue with duplicate URLs appearing in the page-sitemap.xml.

2. With WPML Multilingual CMS, WPML String Translation, Yoast SEO, and WPML SEO (additional) installed:
hidden link All URLs are combined in a single sitemap, and the issue of seeing URLs from all languages in the page-sitemap.xml arises.

I want to maintain the "Different languages in directories" setting while generating separate sitemaps for each language.

December 2, 2024 at 6:57 am #16464258

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

as I have said, that is not possible. WPML and Yoast SEO create 1 sitemap for all languages. That is how it works.

If you wish to have each sitemap per language, you would need to use domain per language mode and have languages like domain.com, esdomain.com and etc.

Hope this helps, let me know if any other doubts.

Regards,
Drazen

December 3, 2024 at 5:24 am #16469310

jiwoongh

The question has been resolved. thank you