Question

#692236
  • Resolved dada20000
    Rank Math free

    Hi, can you help us with something. We have follow and no index in search pages for woocommerce, but we need no follow/no index, we try many functions but they are not working,we still see follow, can you tell us with what is connected follow for the search pages for woocommerce, thank you! Best, Daria

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    I’m sorry to hear that you’re experiencing issues with setting the follow and noindex directives for the search pages in WooCommerce. It seems like you’re trying to change the settings but they are not reflecting as expected.

    To set the nofollow and noindex directives for the search pages in WooCommerce, you can use Rank Math’s advanced settings. You can navigate to the Meta Box of the individual search pages and set the directives accordingly. Here’s a helpful guide on how to use the advanced tab in Rank Math SEO’s Meta Box: Advanced Tab in Rank Math SEO’s Meta Box.

    If you’ve already tried this method and it’s not working as expected, please ensure that the settings are correctly configured and saved. If you’re still facing issues, please feel free to assign this ticket to our support team by clicking on the available button, and we’ll be more than happy to assist you further.

    Thank you for reaching out to us, and we appreciate your patience as we work to resolve this issue for you.

    Sources:
    Advanced Tab in Rank Math SEO’s Meta Box
    Fix Excluded by NoIndex Tag – Google Search Console Status » Rank Math
    How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math

    Hello,

    Thank you for your patience.

    Could you please share a sample search URL on your site so we can check as well?

    Meanwhile, here’s a filter that will apply to your internal search to nofollow (for /?s= or /search/):

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

    Here is a guide you can follow to add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how this goes.

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Question’ is closed to new replies.