indexed spam url in search ajax
-
Hello,
I am using the WoodMart theme on my website.
In the AJAX search located in the site’s header, URLs such as the ones below are being indexed by Google, and their number is quite high.URL#1:
https://mosbatesabz.com/shop/page/9/?s=ビットコイン投資|Bityard.com+258U+Bonus&post_type=product&stock_status=onsale
URL#2:
https://mosbatesabz.com/shop/page/9/?s=ビットコイン+みんなの+仮想通貨|Bityard.com+258U+Bonus&post_type=product
URL#3:
https://mosbatesabz.com/?add-to-cart=103996URL#4:
https://mosbatesabz.com/shop/page/9/?s=etherums+coinbase|BitYard.com+Crypto+Price&post_type=product&stock_status=onsale
These types of searches are related to products that do not exist on my website, and the primary language of my site is Persian.
The solution I implemented to fixed this issue was to add the following code at the beginning of the functions.php file of the child theme.add_filter( ‘rank_math/frontend/robots’, function( $robots )
{
$url = $_SERVER[‘REQUEST_URI’];if( strpos($url,'?') || strpos($url,'search') ) { $robots["follow"] = 'follow'; $robots["index"] = 'noindex'; } return $robots;
});
However, it seems that it has no effect in resolving the problem.
Screen shot related with issue:
- The topic ‘indexed spam url in search ajax’ is closed to new replies.