I have a website with 2 languages, the default language is English, the secondary language is Spanish, I am using a single Sitemap file generated by Yoast SEO hidden link in the file it is observed that both are included languages, however Google is only indexing the pages in English.
Google is taking the pages in Spanish as a redirection of the pages in English, but the pages in Spanish should be indexed anyway.
My question is, why doesn't Google index the pages in Spanish?
Do you have any information about this issue?
I am aware that WPML with the installation of the SEO plugin allows the creation of a Sitemap through Yoast SEO that allows indexing in both languages.
I need google to index all pages regardless of language.
I understood the issue you're having. While checking the debug info, I found that the "Browser language redirection" feature of the WPML plugin is enabled on your site. Please be informed that Google understands the browser language redirection as a redirect to another URL. Therefore, you may notice some issues with links on the search console.
I hope you can understand. If you want Google to index all pages and posts of your site, you can keep the Browser language redirection disabled and submit the sitemap again to recrawl. I hope it will help.
If you need further clarification or assistance on this matter, please don't hesitate to reach out. I will be happy to assist.