I wanted to ask if there is any possibility and how a no-index tag could be added that affects all the pages of a domain that follow the following structure example.com/nnnn97nnnn.html with "n" being any random number and 97 being in the middle They are always repeated in all URLs. Example: example.com/6512978912.html
This is a website that was affected by the Japanese Keyword Spam malware that generated thousands of URLs pointing to a Japanese e-commerce. The malware has already been cleaned, all these URLs return a 404 error and Google is gradually deindexing these URLs also with the help of the Google Search Console URL Removal tool.
However, I want to do everything possible so that these URLs disappear and are not reindexed despite giving a 404 error since, according to what other users tell me, this malware can generate links from external sites pointing to the affected site that can cause them to be reindexed despite giving error 404 and they are not completely deleted so quickly when searching with the site: command. Sometimes pages deleted with the Google Search Console URL removal tool reappear, because the request of removals expires in a couple of weeks, supposedly because there are other external links that are pointing to those URLs.
(Note: the way I see these pages supposedly being re-indexed is by doing a Google search with the site: command)
What can I do so that no URL is indexed with this structure that I mentioned and speed up the deindexing process as much as possible?
Regards, and thank you very much.