Prevent Spotlight searches in files on Mac
You can exclude files in specific folders or disks from Spotlight searches.
On your Mac, choose Apple menu > System Settings, then click Siri & Spotlight in the sidebar. (You may need to scroll down.)
Click Spotlight Privacy in the lower right, then do any of the following:
Exclude files in a folder or disk from Spotlight searches: Click the Add button , then select a folder or disk. You can also drag folders or disks into the field.
Include excluded files in folders or disks in Spotlight searches: Select the folder or disk in the list, then click the Remove button .
If you exclude a Time Machine backup disk, you continue to receive messages that Spotlight is indexing it. This indexing is necessary for Time Machine to function properly and can’t be turned off. When searching, Spotlight does exclude items stored on the backup disk that aren’t part of a Time Machine backup.
Important: If you exclude certain files and folders, you may not be notified when updates become available for some apps. If you exclude your entire internal disk, you won’t be notified about any updates.
To learn more about how Apple protects your information and lets you choose what you share, click About Siri Suggestions, Search & Privacy, or see the Apple Privacy website.