Hello,
Thank you for reaching out to us regarding your sitemap structure with Rank Math and WPML. I understand that you are looking to have separate sub-sitemaps for each language within the main sitemap for each post type.
Currently, Rank Math automatically creates a sitemap of all your posts, including translated posts/pages. The translated pages are automatically added to your sitemap index available at domain.com/sitemap_index.xml. Each translated post/page is included in the main sitemap without language-specific sub-sitemaps.
If you wish to have separate sub-sitemaps for each language within the main sitemap for each post type, this specific customization is not available within Rank Math’s current features. The sitemap structure includes all languages in the main sitemap index.
If you have any more questions or need further assistance, please feel free to ask. Thank you for your understanding.
Best regards.
Sources:
Multilingual SEO with Rank Math SEO & WPML » Rank Math
How to Perform SEO for Multiple Languages Using Rank Math and TranslatePress » Rank Math
Why Are My Translated Pages Not in the Sitemap? » Rank Math
Multilingual SEO with Rank Math SEO & WPML » Rank Math
Remove Blank Lines From Sitemaps » Rank Math
Great thanks for you answer!
Just in case, do you know if it is possible to hook into the sitemap creation and customize it?
I know this that this kind of customizaiton will not be supported but you might point me in the direction of the right filter and action hooks to use.
Thanks a lot
Hello,
Thank you for your patience.
In this case, you may refer to our filter here to create your custom sitemap:
https://rankmath.com/kb/custom-sitemaps/
Hope that helps.
Thanks Reinelle!
Will have a look 🙂
Have a nice day
Hello,
Sure, let us know how this goes.
Meanwhile, please don’t hesitate to contact us anytime if you have other questions to assist you further.
Looking forward to helping you.
Thank you.