Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

This is not a bug and the expected behavior. Yoast Multilingual users might see a different structure but both are equally valid and the structure of your sitemaps does not affect your SEO in any way.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 22 replies, has 4 voices.

Last updated by Izzi Hassan 1 year, 2 months ago.

Assigned support staff: Izzi Hassan.

Author Posts
November 12, 2020 at 11:13 pm #7438741

acs001

When going to my website, which uses Rank Math, the sitemap_index.xml shows links to content in English and Spanish, when it's just supposed to show links to content in English. The /es/sitemap_index.xml works perfectly as it only has links to content in Spanish. This bug didn't happen when I was using Google XML Sitemap, but I need to use Rank Math's.

Link to a page where the issue can be seen: hidden link

I expected to see:Just links to content in English

Instead, I got: Links to content in English and Spanish combined.

November 13, 2020 at 2:15 am #7439187

acs001

Check out hidden link and all other files under the sitemap_index.xml.

November 15, 2020 at 12:56 pm #7451285

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I can see that we've became compatible with Rank Math only recently and that for any issue we closely cooperate with them.

That being said, can you do the following?
- hidden link
- on the above sandbox, configure WPML with same languages as they are on your site
- also install and setup Rank Math as it is set in your site
- create maybe 2-3 example posts and then translate them into other language, such as Spanish
- let me know about the URL of these site maps and if you see the issue there as well

I will then bring this whole case to our compatibility team, it will be much easier for them and if needed, for Rank Math developers to understand the problem (with much less content) and how to tackle it.

Let me know if you have any questions!

hidden link

Regards,
Bruno Kos

November 15, 2020 at 3:39 pm #7452051

acs001

I was able to reproduce two issues actually. For the Sitemap one, here are the links:

hidden link

-It has links in both English and Spanish; the English one is the one that should only be here.

hidden link

-It has links in Spanish; this one works perfectly.

November 16, 2020 at 7:01 am #7454841

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

This has been escalated to our Compatibility team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.

Regards,
Bruno Kos

November 18, 2020 at 12:08 pm #7474345

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

According to our 2nd tier, this is expected as per:
https://wpml.org/documentation/plugins-compatibility/optimize-multilingual-websites-using-rank-math-and-wpml/#rank-math-sitemaps-and-wpml

With sitemaps, the important thing is that the links all be correct (doesn't matter which sitemap you are in) and that the actual pages have all the correct SEO meta like hreflang.

Is this causing any actual issue in your google console?

Regards,
Bruno Kos

November 18, 2020 at 2:18 pm #7475305

acs001

I'm used to enter /sitemap_index.xml and /es/sitemap_index.xml in Google Console (or sitemap.xml and /es/sitemap.xml when I was using Google XML Sitemap). My goal is to keep the index of the posts separated per language (even when using Google Search). I did not have such problem when I was using Google XML Sitemap. Also, Rank Math requires the main sitemap feature to be on for its Video Sitemap and News Sitemap. I guess if I keep using this, the English posts might appear when someone looks for info in Spanish in Google News. This may also put a stop on my efforts to use PWA (progressive web app) for each language, I guess, because I rely on sitemaps for that.

November 19, 2020 at 7:27 am #7480219

Izzi Hassan

Hi,

Thank you for reaching out.

According to our internal documentation, there was an issue with the integration with Rank Math, which meant that unlike Yoast SEO or Google XML Sitemap, the sitemaps do not get grouped properly into each language. This may be fixed in the future, but in order to ensure that there are no problems for our clients, we add language specific information to each page.

Google and other search engines use the sitemap to understand which pages you want to index. They then crawl each page for extra information like "title, description, alternate URL, hreflang (Language)".

So, even though the sitemaps are not organized as well as you would like, they should be working properly.

To test this, I used a crawling software to crawl hidden link;

As you can see in the screenshot attached, the crawler is seeing each page correctly and detecting both language versions along with the correct URLs for each version.

As for your issue regarding PWA, if you MUST have the sitemaps in the organization that you require, I would recommend using something like Yoast, or a snippet to generate your sitemap for the PWA.

Otherwise, if you can share some information about how you are setting up the PWA to use sitemaps, I may be able to provide some input about how to work around this issue.

Best,
Izzi

November 19, 2020 at 7:32 am #7480239

Izzi Hassan

I'm attaching the screenshots from my sitemap crawler tool

Please note that only the sitemap pages do not have a language detected.

I paused the crawl after a while, so this is for only about 500 pages out of 8000 detected via the sitemaps.
-----------

With this information, I feel confident that none of your English pages should be shown as Spanish by Google or other search engines.

Do you currently have Google Search Console set up?

Elmundo hreflang summary.PNG
Elmundo without hreflang pages.PNG
elmundo hreflang.PNG
November 19, 2020 at 1:44 pm #7484413

acs001

Did you test hidden link and all the links under that one, including hidden link ? Those are showing Spanish posts correctly, and not the English ones.

It seems like only the default one [ hidden link ] doesn't have the languages detected, though [ hidden link ] does.

I do have Google Search Console, and I'm about to remove the Sitemap links that Google XML Sitemap created from there. Google XML Sitemap does not offer News Sitemap and I don't feel like going back to Yoast because Rank Math offers a lot more features.

I'm manually adding PWA though I'm looking for a very good WP plugin for that, too.

I also noticed that only one Sitemap link appears on robotx.txt, the default one [ hidden link ].

Another thing I've seen: When I'm using WPML and I publish a post or article in Spanish and then I click on Rank Math --> Sitemap Settings, it shows me " Your sitemap index can be found here: hidden link " (the one for English) for some reason. It seems like Rank Math or WPML doesn't recognize the language correctly. To temporarily change that, I have to change the language using the WPML flag thing on top twice (first time to switch it to English and the second time to switch it to Spanish). It will then show the correct sitemap for Spanish content.

wpml_rank_math_wrong_sitemap_language_shown.jpg
wpml_rank_math_wrong_sitemap_language_shown_002.jpg
November 23, 2020 at 11:17 pm #7512839

acs001

Just a little, quick update: Robots.txt appears under /es/ as hidden link .

November 28, 2020 at 12:25 am #7547275

acs001

I just installed the latest update for the PenNews theme (v.6.6.0), WPML (v.4.4.6) and Rank Math (v.1.0.53 and Pro v.2.0.4), but the issue continues.

November 30, 2020 at 5:49 am #7555817

acs001

I updated Rank Math again tonight, but the bug continues.

December 1, 2020 at 3:15 am #7565755

acs001

The WPML test site [ hidden link ] in which I was able to replicate the issue is no longer available. Are you working with Rank Math about this specific issue? I haven't seen a reply from anyone at WPML in almost 12 days nor a reply from Rank Math for five or six days (except for a message asking me if their latest update was able to solve the issue; it did not).

December 3, 2020 at 2:09 am #7582901

acs001

Another thing, after selecting Rank Math --> Sitemap Settings, and then select "All languages" with WPML on the admin bar, I see [ hidden link ]. But when I click on it, I get a "404 Page Not Found" message. It seems like [ hidden link ] (the one for the default language, in this case, English) is getting all the links in both languages that [ hidden link ] should be getting.