Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
We have tried checking your sitemap, but we’re getting blocked by Cloudflare’s Error 1020 Access denied.
If you are using geo-blocking, please temporarily unblock the country Portugal, India, and the Philippines so we can check your sitemap and the affected URL as well.
Meanwhile, please try using this filter to exclude your sitemap from being cached:
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
The filter should be added to your active theme’s functions.php file. Here’s another way to apply the filter using the rankmath.php file:
https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php
I hope that helps.
Thank you.
Hello Reinelle,
That filter did not seem to have an impact. The URLs we want to remove are in the sitemap still.
Are you able to access our sitemap now?
Do you have suggestions how to manually remove those URLs from the sitemap?
Thanks.
Hello,
Yes, we are able to see your sitemap now.
In this case, please try using these filter to remove the links manually from your sitemap:
add_filter( 'rank_math/sitemap/entry', function ( $url, $type, $object ) {
$urls_to_skip = array(
'https://www.abclawcenters.com/columbus-birth-injury-attorneys/',
'https://www.abclawcenters.com/blog/2018/05/19/jesse-reiter-publishes-maj-journal-fall-2006-presidents-column/',
'https://www.abclawcenters.com/blog/2018/05/19/reiter-walsh-p-c-named-the-best-lawyers-in-america-in-2016-by-u-s-news-world-report-best-lawyers/',
);
if ( isset( $url['loc'] ) && in_array( $url['loc'], $urls_to_skip ) ) {
return false;
}
return $url;
}, 10, 3 );
If they are still showing, please flush again the sitemap cache in sitemap settings and permalinks.
I hope that helps.
Thank you.
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.