I don't know why, but Google started indexing some pages that we don't have on our server. Mostly pages with the ?tag=22&page=30
query string. By the way, we don't have any "tag", and as result number of 404 pages increased on the site's Google Search Console.
?tag=22&page=30
?tag=27&page=530
?tag=27&page=600
?tag=309&page=81
How can I close/disallow access to this files?
I've added this line, but I'm not sure if it will work:
Disallow: /?tag*