Products that have been archived coming up in search engines

Hello to everyone, hopefully can get some help here, hope I’m in the correct area.

I’m still in the building stage and planning to dropship products from a company, they send a CSV the products load in (over 4000 of them) and we have now (by choice) a limited range of products/collections until we decide to sell everything.

Problem is, that although we have archived many collections/products they’re still coming up in search engines.

So what I want to know is there any way of stopping this from happening without deleting the products? because every time we get an updated CSV they will only return. Want to keep them archived until the future.

I’ve used Metafields Master to hide collections but realised the products themselves will not be hidden.

Is there a piece of code (like ‘noindex’) that can globally affect all products?

Any help will be appreciated.

Cheers

J