-
I updated the permalinks, refresh the CDN, etc. Nothing works… most of my pages show up in the sitemap, even if they are marked as no-index.
Interestingly, on my staging domain, it works better… Not perfectly, but better. For some reason it’s still slow to update the sitemap, even after updating the permalinks (and I have no CDN or such there) then on the proper domain, after cloning the staging website there, the sitemaps aren’t right.
I’m also trying to add dynamicly created page’s URL to the sitemap using this code, but it’s not working:
/**
Filter to add extra URLs to the XML sitemap by type.
*
Only runs for the first page, not on all.
*
@param string $content String content to add, defaults to empty.
*/
add_action( ‘rank_math/sitemap/page_content’, function() {
return ‘<url>
<loc>https://element.how/addon-finder/elementor-audio-player/</loc>
<lastmod>2021-21-22T18:02:24+00:00</lastmod>
</url>
‘;
});
The ticket ‘Many pages marked as ‘no-index’ are still showing up in my sitemap’ is closed to new replies.