Spotlight is a powerful tool, offering instant search through everything on your Mac. But sometimes you’d rather keep some files private. Or maybe you’re just tired of seeing configuration files in the results. In either case, it’s easy to hide a folder and its contents from Spotlight search. Here’s how.
First, click the Apple icon in the upper-left corner of the screen and select “System Preferences” from the menu that appears.
When System Preferences opens, click “Spotlight,” which looks like a magnifying glass.
In Spotlight preferences, click the “Privacy” tab. Just below the list labeled “Prevent Spotlight from searching these locations,” click the “plus” button (“+”) to add a folder.
When the file browser window pops up, locate the folder you’d like to exclude from future Spotlight searches. You can’t pick individual files here, but you can choose a folder that contains the files you’d like to hide from the search.
Select the folder location and click “Choose.”
After that, you’ll see the folder you just added in the Spotlight exclusion list.
If you’d like to add another folder, just click the plus button again and repeat the process.
When you’re done, 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!