Duplicate Shop Page in Sitemaps

#897201
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    We apologize for the issue you are facing with the duplicate Shop page appearing in both your page and product sitemaps. This can happen due to how the sitemaps are generated and the settings in your Rank Math configuration.

    To resolve this issue, you can try the following steps:

    1. Check Your Sitemap Settings: Go to Rank Math > Sitemap Settings and ensure that the settings for your Shop page are configured correctly. You may want to exclude it from one of the sitemaps if it is not necessary to have it listed in both.
    2. Clear Cache: If you are using any caching plugins, clear the cache to ensure that the latest sitemap is being served.
    3. Check for Plugin Conflicts: Sometimes, other plugins can interfere with how sitemaps are generated. You can use the Health Check plugin to identify any potential conflicts.
    4. Custom Canonicals: If you have set custom canonical URLs for your Shop page, it might affect its appearance in the sitemaps. Ensure that the canonical settings are correct.

    If these steps do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for bringing this concern to our attention!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    You can remove the shop page from the product sitemap by adding the following filter on 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/

    After doing that flush the sitemap cache by following this video screencast: https://i.rankmath.com/pipRDp

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Duplicate Shop Page in Sitemaps’ is closed to new replies.