This fails with this plugin because it doesn’t create a list of searches without them having matched content in your posts.
How to block this traffic? Put this into your .htaccess file:
RewriteCond %{REQUEST_URI} ^/search/(.+)$ [OR]
RewriteCond %{QUERY_STRING} s=(.+) [NC]
RewriteCond %{REQUEST_METHOD} HEAD
RewriteRule ^ - [F,L]
What it does?
The first two lines ask if this is a search and the third line asks if they are using a HEAD request. The final line blocks them if 1 or 2 is matched along with 3.
Googlebot does NOT use HEAD requests and does not use your search form. Googlebot doesn’t submit any forms. This is why you don’t get spam comments from Googlebot submitting it.
When you interact with a form there are only two ways to pass your query to the form: GET and POST. So no need for anyone to use your search with a HEAD request. Block them!
]]>