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.

After adding a folder, it will appear in this 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!

RELATED: How to Use macOS' Spotlight Like a Champ

Profile Photo for Benj Edwards Benj Edwards
Benj Edwards is a former Associate Editor for How-To Geek. Now, he is an AI and Machine Learning Reporter for Ars Technica. For over 15 years, he has written about technology and tech history for sites such as The Atlantic, Fast Company, PCMag, PCWorld, Macworld, Ars Technica, and Wired. In 2005, he created Vintage Computing and Gaming, a blog devoted to tech history. He also created The Culture of Tech podcast and regularly contributes to the Retronauts retrogaming podcast.
Read Full Bio »