XML Sitemaps translations break protocol

[ad_1]

Hi,

Polylang adds translation sitemaps to the XML Sitemap index like this:

https:/doma.in/wp-sitemap-posts-post-1.xml
https:/doma.in/fr/wp-sitemap-posts-post-1.xml
https:/doma.in/wp-sitemap-posts-page-1.xml
https:/doma.in/fr/wp-sitemap-posts-page-1.xml

This is OK as long as The language is set from content under Languages > Settings > URL modifications is not used. But when that option is set, then posts and pages in their respective translation sitemaps, will not be within the location scope of that sitemap anymore.

In the above example, the sitemap https:/doma.in/fr/wp-sitemap-posts-page-1.xml might be listing a french “about” page like https:/doma.in/a-propos/ which does not fall under the /fr/ directory.

Read the specs on https://www.sitemaps.org/protocol.html#location

Please fix 🙂

Suggestion: just include all languages in the main sitemaps, there is no need to create sitemaps per language at all…

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer