How to Exclude a Safe Folder from the Windows Defender Scan
And which folders you should never exclude — with the real security precautions.
If you have a very large folder that slows down scans, or a legitimate program that Windows Defender repeatedly flags by mistake, you can exclude it from the scan. Before doing so, it's worth understanding exactly what that involves.
Warning: excluding a folder reduces actual protection for that folder, it isn't a cost-free setting. It's only worth it if you're sure the content is safe — don't use it as a routine way to "silence" Defender warnings without investigating what triggers them.
How to exclude a folder
- Windows Security → "Virus & threat protection" → "Manage settings".
- Scroll down to "Exclusions" → "Add or remove exclusions".
- "Add an exclusion" → "Folder" → select the folder.
Note: excluding a folder automatically excludes all its subfolders too. Keep this in mind before excluding a very general folder (like your entire Downloads folder) instead of a more specific one.
This is NOT the right approach for a one-off false positive
If Windows Defender flagged one specific file by mistake a single time, the right approach isn't permanently excluding the entire folder — it's better to restore it and allow it specifically. Reserve full-folder exclusions for ongoing use cases (a development projects folder, for example), not a one-off file.
What to never exclude
- Network drives — exclusions don't work reliably there, and they carry a higher risk since it's content shared with others.
- System folders (Windows, Program Files) — Defender already manages these intelligently by default; excluding them manually adds nothing and only removes protection.
- Generic download folders — this is precisely where keeping the scan active makes the most sense, being the most common entry point for files from diverse sources.
A recommended additional step
After excluding a folder, consider turning on "Controlled folder access" for that same location — that way, even though Defender won't scan it, it will still watch for any unauthorised program trying to modify its content without your permission.
Frequently asked questions
Does excluding a folder leave it completely unprotected?
Against virus scanning, yes, but you can complement it with 'Controlled folder access', which keeps watching for unauthorised changes in that folder even though it isn't scanned for malware.
Is this the right way to fix a one-off false positive?
No — for one specific file flagged by mistake, it's better to restore it and mark it as 'Allow' from quarantine. Full-folder exclusions are for ongoing use, not one-off cases.
Can I exclude just a file type instead of an entire folder?
Yes, on the same exclusions screen you can choose 'File type' instead of 'Folder', to exclude a specific extension (like .test) anywhere on the machine.