Default meta robots settings do not work 1.0.50.1

#96077
  • Resolved m4rny
    Rank Math pro

    The default noindex setting for categories does not work in version 1.0.50.1. Actually, no setting in the robots meta for categories works, the categories are always set to “follow, index”. The settings for the tags are working and you can see the correct meta robots in the html. The settings per category work fine, but the default setting has no effect. https://take.ms/DrIkt

    It always is like this:

    <meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large">

    I checked it with two different sites and a clean wordpress install. Same result.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sajid Khan
    Rank Math business

    Hello

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    It is working fine on our end:
    https://i.mythemeshop.com/61AyoQ

    Assuming you are using the latest version of all the plugins, themes, and WordPress (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Looking forward to helping you.

    Hi, I got around this by adding the code below and only then it worked properly. As if the default setting has no effect. In my free time, I will examine it more closely.

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
        if (is_category()){
            $robots['index'] = "noindex";
            $robots['follow'] = "follow";
            return $robots;
        }
    return $robots;
    });

    Thanks for the answer. Best wishes,
    Lukasz

    Alberto
    Rank Math business

    Hello,

    Good news you managed to solve it! Then, do you have any other questions? Or do you want us to close this thread? In any case, we will be here if you have any other questions or issues in the future.

    Looking forward to help you.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this ticket.