Spotlight is a powerful tool that offers instant searches through everything on your Mac. But every now and then you prefer to keep some files private. Or maybe you are just tired of seeing configuration files in the results. Whatever the case, it's easy to hide a folder and its contents from Spotlight search. That's how.
First, click on the Apple icon in the upper left corner of the screen and select “System preferences” in the menu that appears.
When System Preferences opens, click on “Spotlight”, that looks like a magnifying glass.
In Spotlight preferences, click on the tab “Privacy”. Just below the list named “Prevent Spotlight from searching for these locations”, Click the button “plus” (“+”) to add a folder.
When the file explorer window appears, locate the folder you want to exclude from future Spotlight searches. You cannot select individual files here, but you can select a folder that contains the files you would like to hide from search.
Select the folder location and click “To select”.
Thereafter, you will see the folder you just added in the Spotlight exclusion list.
If you want to add another folder, just click the plus button again and repeat the procedure.
When it's over, close System Preferences. Like a loyal friend, your Mac will conveniently "forget" to include those folder locations in any future Spotlight searches. Stay safe out there!
RELATED: How to use macOS Spotlight like a champ