• Resolved 99w

    (@ninetyninew)


    When running a Screaming Frog crawl of our site with Rank Math installed we noticed that ?filter_brand=xxx URLs are not indexed, it looks like these canonical back to /shop

    Is there a way to make these indexable?

Viewing 1 replies (of 1 total)
  • Plugin Author Rank Math SEO

    (@rankmath)

    Hello @ninetyninew,

    Thank you for contacting the support.

    The ?filter_brand=xxx looks like a Product search URL. You can add this Search URL in canonical tag by using the following code:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	if ( ! isset( $_GET['filter_brand'] ) ) {
    		return $canonical;
    	}
    	$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "https://";  
    	return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];  
    });

    Please stay advised that it is not recommended to index these type of URLs as Google could mark them for duplicate content.

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Index WooCommerce filter URLs’ is closed to new replies.