-
Hi team,
We’re planning to switch to RankMatch Pro from Yoast Premium and currently trying the free version of RankMath on a staging environment.
Internally, we have a use-case, where we define the robots via headers (X-ROBOTS-TAG) and we remove the “robots” meta tag from the HTML.
In Yoast, we’re able to do this with the following filters
add_filter('wpseo_robots', '__return_false');
add_filter('wpseo_googlebot', '__return_false'); // Yoast SEO 14.x or newer
add_filter('wpseo_bingbot', '__return_false'); // Yoast SEO 14.x or newer
Is it possible to do it with RankMath too?
I already tried “rank_math/frontend/robots” but couldn’t make it work.
add_filter( 'rank_math/frontend/robots', function( $robots ) {
return array();
});
Thank you.
The ticket ‘How to Remove Robots Meta Tag’ is closed to new replies.