• Resolved tunyk

    (@tunyk)


    1. rel=”alternate” hreflang=”” (including x-default) is not automatically added to <url> in the xml sitemaps (generated by the RankMath plugin), if some translation plugin is also installed.

    At the same time, the xml sitemaps contain <url> pages in different languages.

    Write how to make rel=”alternate” hreflang=”” (including x-default) be added to in xml sitemaps (maybe there are some filters) or add this functionality.

    I’m using Polylang, but as far as I understand this problem is common regardless of the translation plugin.

    You yourself write that it is important for SEO here https://rankmath.com/blog/hreflang-tags/ (in point 6.3).

    1. Problem with multilingual links when using [rank_math_html_sitemap]

    On the page where the shortcode is installed:

    • record categories and product categories (woocommerce) are displayed in the language that = the language of the current page – this is true;
    • pages, records and products (woocommerce) are displayed in all languages ??at the same time (regardless of the language of the current page) – this is NOT true.

    Write how to fix it.

    PS. I use the latest version of your code https://rankmath.com/kb/polylang-compatibility/

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tunyk,

    Thank you for contacting support.

    1. There are 2 accepted ways to create the sitemaps so that Google discovers all the pages. You can either add all the languages to the sitemap or add only the main language and ensure that the pages contain the hreflang tag with all the other alternate languages.

      This tag is added to the source code of the language pages and not to the XML sitemap directly and that is handled automatically by the translation plugin you are using, not by your SEO plugin, which in this case is Rank Math.

      With our plugin, we use the second method which is allowing the tag to be added to the pages, not the sitemap, by the translation plugin, which Polylang does correctly and you’ll see the same if you inspect the source code of the pages.
      ?
    2. The compatibility layer we have for Polylang does not apply to the HTML sitemap, at the moment. It’s designed solely for the XML sitemap, metadata, and other small settings that were inaccurate without this.

      If our team decides to update the compatibility code to include support for the HTML sitemap we’ll notify you of the same.

    Don’t hesitate to get in touch if you have any other questions.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.