How To Prevent Safari from Opening Downloaded Files

Ask a question
Safari automatically opens downloaded files it considers as Safe. It may include compressed files, PDF, pictures, videos, and other type of files downloaded from trusted sources. But sometimes, the so-called safe files may contain viruses or malware.

You might want to turn off this feature (enabled by default) for your own good. It can be done from Safari's preferences or through a simple terminal command.

Turn Off "Auto Open Safe Download" in Safari

Launch Safari, click on the Safari menu > Preferences. Go to the General tab and clear the Open "safe" files after downloading checkbox.

Turn Off "Auto Open Safe Download" from the Terminal

To turn off the auto-open function from the terminal, simply open a terminal and run the following command:
defaults write com.apple.Safari AutoOpenSafeDownloads -boolean NO
.
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team