Hello,
Thank you for contacting Rank Math today.
You could use some custom code in your functions.php file to set custom robots in Rank Math for URLs matching a pattern, this would be the hook:
/**
* Allows filtering of the robots meta data.
*
* @param array $robots The meta robots directives.
*/
add_filter( 'rank_math/frontend/robots', function( $robots ) {
return $robots;
});
https://rankmath.com/kb/filters-hooks-api-developer/
Looking forward to helping you. Thank you.
Dear Alberto,
Thank You very much for such a quick reply.
Unfortunately, I’m not pro in creating filters.
Is there any simpler solution?
Hello,
There is a simpler way to disallow bots from seeing when you have a particular URL pattern.
You can go to WordPress Dashboard > Rank Math > General Settings > Edit Robots.txt and add the following text in there:
User-Agent: *
Disallow: /*?et_blog*
Disallow: /?et_blog*
That will prevent bots from seeing and hopefully not indexing all URLs that contain et_blog
in them.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Thank you, Todd!
Have a good day.
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.