How can I remove a spam page from my website index?

Thanks, we found that this is also working to noindex the vendor pages. What code did you use to stop writing the query into the title tag? I tried this but it ends up breaking the title tags on each page and only prints the url of the page.

{%- if request.path == ‘/collections/vendors’ and collection.all_products_count == 0 -%}

No Results Found {%- else -%} {{ seo_title | strip }} {%- endif -%}