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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Argentina/Buenos_Aires (GMT-03:00)

This topic contains 1 reply, has 0 voices.

Last updated by Otto 5 days, 2 hours ago.

Assisted by: Otto.

Author Posts
August 5, 2025 at 8:23 am #17295350

sienaG

Background of the issue:
I’m trying to get WPML to generate language-specific sitemap indexes (e.g. /de/sitemap_index.xml, /en/sitemap_index.xml) so that they can be submitted to Google Search Console for proper multilingual indexing. I’ve installed WPML, WPML SEO, and Rank Math. The language structure is correctly set to 'directories' (e.g. /de/, /en/). There is at least one fully translated and published page per language. The hreflang setting is enabled. Permalinks have been flushed. Caching has been cleared. I’ve followed all instructions from both Rank Math and WPML documentation. Link to a page where the issue can be seen: hidden link

Symptoms:
The language-specific sitemaps return 404 errors: /de/sitemap_index.xml, /en/sitemap_index.xml. This issue persists across multiple content types and languages.

Questions:
How can I force WPML to correctly generate language-specific sitemap indexes?
Is there a workaround if this functionality is broken or disabled?

August 5, 2025 at 6:16 pm #17297705

Otto
WPML Supporter since 09/2015

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

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

Hello,

This behavior is expected and not a bug. When using the 'Language in Directories' format, the multilingual sitemaps generated by Rank Math do not follow the standard structure. Instead, WPML creates hreflang tags for search engines to recognize the default language and its translations.

Check this documentation
https://wpml.org/documentation/plugins-compatibility/optimize-multilingual-websites-using-rank-math-and-wpml/#sitemaps-and-wpml

https://wpml.org/documentation/support/adding-hreflang-wordpress/

To sum up, your site should use the single root sitemap (most common & Google-compliant)

- Ensure Rank Math ► Sitemap Settings → Include all post types & taxonomies is enabled.
- Keep WPML “Language URL format” as directories.
- Flush permalinks (Settings ► Permalinks → Save Changes).
- Submit only hidden link to Google Search Console; Google discovers /de/, /en/, etc. through the hreflang links automatically. No manual workaround is necessary.

Best Regards,
Otto