Customize Sitemap Markup structure

#461985
  • Resolved Geraldo Junior
    Rank Math free

    Hi, I would like to know if it’s possible to edit and customize my sitemap to match the following structure:


    <url>
    <loc>http://www.example.com/english/</loc>
    <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/>
    <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/>
    <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/>
    </url>
    <url>
    <loc>http://www.example.com/deutsch/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/>
    <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/>
    <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/>
    </url>
    <url>
    <loc>http://www.example.com/schweiz-deutsch/</loc>
    <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/>
    <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/>
    <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/>
    </url>

    Is this possible? I need each URL loc to refer to the alternate translation and each one to have a tag with the hreflang to the region location.

    Please, let me know if this is possible using RankMath or if it’s only possible using manual code insertion.

    Regards,
    Geraldo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Rank Math usually only handles adding the default language to your sitemap. Other languages are handled automatically by the translation plugin you use by adding a hreflang into each page automatically.

    Your multi-language plugin needs to add hreflang tags to your translated content so that Google knows that it is a translated version of some other page.

    It is not a must that you have the translated pages in your sitemap. Please note this is perfectly fine and as per guidelines set by Google.

    Currently, Google allows 2 methods for the translated pages:
    1. To generate separate Sitemaps for all the languages.
    2. To generate a single Sitemap and add hreflang tag on the respective pages.

    The number #2 is what Rank Math follows and this method is approved by Google.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hi Md.,

    Thank you for much for your prompt reply.

    I understand. However, is it possible to edit and customize the sitemap generated automatically by RankMath?

    Regards,
    Geraldo

    Hello,

    No, that is not possible as the sitemap is automatically generated from the code our developers have added to that module.

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

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Customize Sitemap Markup structure’ is closed to new replies.