How to stop indexing search result using Robots.txt?
hello.
Recently, I'm having an issue with indexed pages in Google Search Console growing 10x.
These pages are mostly search query (/?s=) and consist of spam queries that have nothing to do with my website, such as Casino and Porn.
What I don't understand is that I've been using robots.txt like this about 5 years ago.
Sitemap: https://example.com/sitemap_index.xml
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: *?orderby=*
Disallow: /?cat=usd&order=desc
Disallow: *?cat=usd&order=desc
Disallow: /?s=
Disallow: /search/
Disallow: /*/page/*
Disallow: */page/*
Disallow: /?s
Disallow: */uncategorized/
Disallow: */?s
Disallow: *?s=
Disallow: /test/*
Disallow: /test2/*
Disallow: /test3/*
Disallow: /test4/*
Disallow: /test5/*
Disallow: /test/
Disallow: /test2/
Disallow: /test3/
Disallow: /test4/
Disallow: /test5/
Nevertheless, the search results were indexed by Google.
Could someone please let me know if there is a problem with the Robots.txt I use?