Hello,
I apologize for the inconvenience you are facing with excluding the “/shop/” page from the sitemap. Since the “/shop/” page does not exist due to the Catalogue Mode plugin hiding it, you can still exclude it from the sitemap by following these steps:
- Head to your WordPress Dashboard.
- Navigate to Rank Math SEO → Sitemap Settings → General.
- Scroll down to Exclude Posts and enter the ID of the “/shop/” page (even though it doesn’t exist) into the field. You can try using a placeholder ID like “9999” for example.
- Remember to separate multiple IDs with a comma.
- Scroll down and click Save Changes.
By following these steps, you should be able to exclude the non-existing “/shop/” page from the sitemap. If you encounter any further issues or need additional assistance, please feel free to reply to this ticket, and a human agent from our support team will assist you promptly.
Thank you for bringing this concern to our attention. We appreciate your efforts in optimizing your client’s SEO, and we are here to help you resolve this issue efficiently.
Sources:
How To Exclude Rank Math Sitemaps from Caching » Rank Math
How to Fix “Incorrect HTTP Header Content-Type” Error in Sitemaps » Rank Math
Remove Blank Lines From Sitemaps » Rank Math
How to Exclude Content From Sitemap » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
Hello,
I feel like my explanation was completely disregarded. I can’t and ID from a page that does not exist. Please help.
Hello,
Apologies for the inconvenience.
It seems that your shop page is the archive of your products, that’s why it is included in the first line of your product sitemap.
However, to remove the URL from your /shop/ from your sitemap, you may need to use this 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/
Once done, follow these steps to flush your sitemap cache:
https://i.rankmath.com/pipRDp
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.