Problem: The client is experiencing an issue with duplicate URLs appearing in the XML sitemap generated by Yoast SEO on a website using WPML SEO. Specifically, URLs for the same slugs appear in multiple sitemaps with and without language prefixes. Solution: We discovered that the issue was not directly related to WPML or Yoast SEO configurations but was due to a problematic content import process. Here are the steps we took to resolve the issue: 1. We identified that the duplicate URLs were linked to blog posts imported incorrectly. 2. The client had run the import process twice due to initial failures in matching translations, which created duplicate entries. 3. We advised the client to delete the first set of imported files and the associated blog posts, which were still present on the server despite not being visible on the frontend. 4. After removing these files and posts, the duplicates in the XML sitemap were successfully eliminated.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.