Resolved
Resolved in: WPML SEO 2.0
Overview of the issue
Rank Math SEO users have reported seeing incorrect entries for their secondary homepages in their sitemap `/page_sitemap.xml`.
For example, if your default homepage has the slug homepage and the translations are homepage-fr, homepage-it, then the sitemap shows:
- https://www.examplesite.com/ (which is correct)
- https://www.examplesite.com/fr/homepage-fr (incorrect as it should be https://www.examplesite.com/fr/)
- https://www.examplesite.com/it/homepage-it (incorrect as it should be https://www.examplesite.com/it/)
This should not adversely affect your SEO as WPML adds 301 redirects to these pages, and `alternate` tags on the homepage tell crawlers where the secondary language homepages can be found.
Workaround
For full compatibility with Rank Math including a solution to this issue, make sure to install and activate the WPML SEO glue plugin.
I was suffering from this BUG and applied the workaround solving the problem. Thank you!
I just ask you for clarification, for the future how should I behave with the code added in the functions.php file? Will I be able to get rid of it with the next updates of Rank math and WPML plug-ins?
Thanks again for the support.
Hello Roberto,
So far this needs some updates from both teams so it may take a while. We will post here once a release will include this fix.
Thank you for your understanding.