Query Strings / Paramters –> Exclude

#258881
  • Resolved Al. W.
    Rank Math free

    Dear Support,

    for different other Tools, like on Magento, there are solutions to define query strings with special meta robots instructions. Like search parameter, login pages etc. for WordPress and WooCommerce.

    Can you please insert also this in Rank Math? A field, where use can insert phrases or query strings?

    Like empty search parameter or filled search query:
    */?s=

    it’s today
    <meta name=”robots” content=”follow, index”/>

    but it should
    <meta name=”robots” content=”follow, noindex”/>

    And this is for a couple of parameters important. That the crawler can follow the structure (or not) and to index it or not.
    A disallow rule in robots.txt isn’t helpful for a running system: Because is it blocked, google and Co will never visit the page again and will never see the freshest updates. And the crawler breaks the process here and leave the page.

    Thanks,

    W.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ankit
    Rank Math business

    Hello,

    Thank you for contacting us and we regret the inconvenience caused.

    You can define your rules in the robots.txt file and Google will honor the parameters mentioned there. To do that Please head over to WordPress Dashboard > Rank Math > General Settings > Edit robots.txt .

    You can learn more about here:”https://rankmath.com/kb/how-to-edit-robots-txt-with-rank-math/

    In order to noindex search results, Please head over to Rank Math > Titles & Meta > Misc pages

    You can learn more about here:
    https://rankmath.com/kb/titles-and-meta/

    Hope that helps and if there’s anything else that we can assist you with, please let us know.

    Al. W.
    Rank Math free

    Dear Ankit,

    I’m not sure, how deep is your SEO Experience.
    As i have mentioned: Robots.txt is something for fresh pages, but not for indexed pages.
    See what Googles Head John Muller say:
    https://www.seroundtable.com/unindex-pages-google-search-31050.html

    (3) If you do decide to unindex them, then use noindex instead of robots.txt.

    Your answer is not this, what google say. And if you think about: If you block google to visit the source code, then he will never see some changes. Now, I have duplicate content. If you block this page, Google will never see any changes.

    Your second recommendation is turned ON. It’s works, if the parameter is filled with a search query. But empty, it’s not working. Yes, i have trust Rankmath. Now, search query string pages are indexed.

    Sorry, to hear, that you are not open-minded to bring the software to a higher level, as competitor do it long time

    Best

    W.

    Ankit
    Rank Math business

    Hello,

    I am sorry for the confusion, In order to add the noindex meta tag you can use the following filter code:

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

    Please kindly add the above into your theme’s function.php file to noindex those pages.

    Then, flush your website cache and let us know how it goes.

    Al. W.
    Rank Math free

    Great, thank you 🙂

    But it would be nice to offer this for all of your clients, also for other query strings and terms.

    Hello,

    Glad that helped.

    I will forward your suggestion to our devs as a feature request. If your suggestion is something that we decide to include in our plugin, we will make sure to inform you. You can also keep an eye on our changelog to get notified about the new features: https://rankmath.com/changelog/

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    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.

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

The ticket ‘Query Strings / Paramters –> Exclude’ is closed to new replies.