Add external sitemap

#783967
  • Resolved Luis Almeida
    Rank Math free

    Hello,

    We have a sitemap that we want to add to sitemap index. In your support there is a button on settings to add a site map, but there is no button or is hidden.

    Can you help on this
    Thanks

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

    I apologize for the inconvenience you are facing. If you have a sitemap that you want to add to the sitemap index in Rank Math, you can follow these steps:

    1. Go to your WordPress Dashboard.
    2. Navigate to Rank Math > Sitemap Settings.
    3. Scroll down to the section where you want to add the external sitemap (e.g., News Sitemap, Video Sitemap, etc.).
    4. Look for the option to add a custom sitemap URL or include external sitemaps.

    If you are unable to find the option to add an external sitemap, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for bringing this to our attention.

    Sources:
    How to Configure Sitemaps in Rank Math – Best Settings and Tips
    Using Video Sitemaps in Rank Math

    Hello,

    Thank you for contacting Rank Math support and bringing your inquiry to us.

    To add an external sitemap to the Rank Math sitemap use the below filter. Please modify as needed:

    add_filter( 'rank_math/sitemap/index', function( $xml ) {
    	$xml .= '
    		<sitemap>
    			<loc>http://example.com/new-sitemap.xml</loc>
    			<lastmod>2020-09-14T20:34:15+00:00</lastmod>
    		</sitemap>';
    		return $xml;
    }, 11 );

    Here’s a way to apply the filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Let us know how this goes. We look forward to hearing back from you.

    Thanks.

    Hello,

    Thank you for reaching out to Rank Math support. We’re happy to help you with your query.

    Please follow this guide to create a custom sitemap and add it to Rank Math: https://rankmath.com/kb/custom-sitemaps/

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

    Thank you.

    Luis Almeida
    Rank Math free

    The code

    <?php

    add_filter( ‘rank_math/sitemap/index’, function( $xml ) {
    $xml .= ‘
    <sitemap>
    <loc>https://demoqa.bizapis.com/sitemapcompanies.xml</loc&gt;
    <lastmod>2020-09-14T20:34:15+00:00</lastmod>
    </sitemap>’;
    return $xml;
    }, 11 );

    Luis Almeida
    Rank Math free

    The end is </loc>

    Luis Almeida
    Rank Math free

    It was cache… everything is working fine

    Thanks in advance

    Hello,

    We’re just following up with you to see if you have any other questions or concerns that we can assist you with. Or, if your issue has been resolved, please let us know so we can mark this ticket as closed.

    Thank you for choosing Rank Math.

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

You must be logged in to reply to this ticket.