Sitemap page removal

#754256
  • Resolved export accelerator
    Rank Math free

    I have requested the tool to remove a page from sitemap by adding the post id to the exclude posts setting. It is still not reflecting.

    I have added the correct post id. Rechecked it.

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

    I’m sorry to hear that you are facing issues with removing a page from the sitemap even after adding the correct post ID to the exclude posts setting.

    If you have added the correct post ID to the exclude posts setting and it is still not reflecting, please ensure that you have saved the changes after adding the post ID. Sometimes, changes may not take effect if they are not saved properly.

    If you have already saved the changes and the page is still appearing in the sitemap, please double-check the post ID you entered to ensure there are no typos or extra spaces. Additionally, make sure that the post ID belongs to the correct post you want to exclude.

    If the issue persists after verifying these details, please reply to this ticket, and a human agent from our 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
    How to Exclude Content From Sitemap » Rank Math
    Why Isn’t My URL Included in the Sitemap? » Rank Math

    I have checked the post Id and saved changes. Still the issue persists.

    Hello,

    The shop URL in your product sitemap is your product archives, so it cannot be removed from that option.

    To remove the shop from your product sitemap, you may need to add this code to your site:

    add_filter( 'rank_math/sitemap/post_type_archive_link', function( $archive_url, $post_type ){
    if ($post_type == 'product'){ // match to the actual post type name
    	$archive_url = false;
    }
    	return $archive_url;
    }, 10, 2 );

    And here’s how you can add a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, follow these steps to flush your sitemap cache:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    Hope that helps.

    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 ‘Sitemap page removal’ is closed to new replies.