No index problem, only when plugin is activated

#612305
  • Resolved Anonymous
    Rank Math free

    We have the following problem with one arhive page: The Rankmath plugin causes it to be set to “noindex”. If we disable the plugin, the page is ok. If the plugin is activated, the following part appears in page inspect:

    <!– Search Engine Optimization by Rank Math – https://rankmath.com/ –>
    <title>……….</title>
    <meta name=”robots” content=”follow, noindex”/>
    ……………………………
    <!– /Rank Math WordPress SEO plugin –>

    The page is an archive php file that exists in the theme files.

Viewing 13 replies - 1 through 13 (of 13 total)
  • 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.

    For initial troubleshooting, please check if this option is enabled on your WordPress dashboard > Rank Math > Titles & Meta > Global Meta

    Empty

    If so, disable it and save the settings. Once done, clear your website’s cache and check again if the archive page is already set to index.

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Hello,
    That option is disabled and still the same “noindex” tag in page source

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hello!
    I added the temporary access in the sensitive data.

    Hello,

    Thank you for your patience.

    Since the page is dynamically generated, I have added a filter to your functions.php file (very bottom part) to set it to index.

    Here it is as well for your reference:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	$url = home_url( $_SERVER['REQUEST_URI'] );
    	if (strpos($url,'dasweltauto') !== false) {
                    $robots['index'] = "index";
    	        return $robots;
            }
    	return $robots;
    });

    The archive page is now set to index. However, the filter might get deleted once your theme updates as it is placed in your theme’s functions.php file.

    You can remove the filter and paste it instead using the rank-math.php file or Code Snippets plugin so the code won’t be removed when the update happens on your site.

    Here’s a guide you can follow as well:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Anonymous
    Rank Math free

    Thank you! I have made a request to index on Google too. I’ll let you know if everything works.

    Anonymous
    Rank Math free

    Ok, now i have another problem. Rankmath gives the page a canonical to “noutati” (articles of my page), and this are not articles, are cars for sale (published using a php archive file). It changes also the title of the page, even if in the code there is a title atribute with the correct name. How can I deactivate this?

    Hello,

    The https://domain.com/noutati/ seems a category page on your site.

    Could you please confirm if you’re referring to that page? If not, please share the affected page so we can check. Also, please share the expected title of that archive page.

    Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    The page that i am reffering to is https://delcar.ro/dasweltauto/. This link displays archive-dasweltauto.php.
    The title I have set on the php file is “Das Weltauto Brașov | DasWeltAuto rulate | Delcar ”
    The page “noutati” is a category page for the blog. I don’t know why it is confused in Rankmath settings with this php file

    Hello,

    We’ve added the following filters on your website to change the canonical and the title of this page.

    add_filter('rank_math/frontend/canonical', function ($canonical) {
        if (strpos(home_url($GLOBALS['wp']->request), 'dasweltauto') !== false) {
            $canonical = home_url($GLOBALS['wp']->request) . '/';
        }
        return $canonical;
    });
    
    add_filter('rank_math/frontend/title', function ($title) {
        if (strpos(home_url($GLOBALS['wp']->request), 'dasweltauto') !== false) {
            $title = 'Das Weltauto Brașov | DasWeltAuto rulate | Delcar';
        }
        return $title;
    });
    

    Now this page has a self-referencing canonical and the same title you’ve set in the PHP file.

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Anonymous
    Rank Math free

    It worked. Now the page is indexed. Thank you very much!

    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.

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

You must be logged in to reply to this ticket.