A file exclusion tells Microsoft Defender Antivirus to skip that file when it scans, so Windows Security stops checking or flagging it. Exclusions cover specific files, folders, or processes. [1]
That comes at a cost: every exclusion is a protection gap that lowers your defenses. [1] Use one to solve a specific problem, such as a performance or app compatibility issue, and keep it to a single file you trust rather than something you merely suspect might cause trouble later. [1]
Below, you get the shortest path to adding one file exclusion in Windows 11 first, then the Windows 10 route.
What should you know before you start?
Only exclude a file you are sure is safe, such as one Defender wrongly flags. If you are not certain what a file is or where it came from, leave it alone.
An excluded file is skipped when Microsoft Defender Antivirus scans, so it is no longer checked for threats. [1] A real threat hidden in that file would pass through unnoticed. A good example is a small tool you built yourself that keeps getting flagged. A bad example is a download from an unknown site that you simply want to open.
This article covers the built-in Defender in Windows Security. If you use third-party antivirus such as Kaspersky, the steps are different, because that program has its own exclusion settings. For instance, Kaspersky has you go to Security settings → Threats and exclusions and click Manage exclusions. [2] Bitdefender and similar programs have their own menus too, so follow your product’s instructions instead.
How do you add a file exclusion in Windows Security?
Adding a file exclusion takes about five clicks in Windows Security.
Select Start, search for Windows Security, and open it. Then choose Virus & threat protection. [3]
Under Virus & threat protection settings, select Manage settings. [4]
Scroll down to Exclusions and select Add or remove exclusions. [4]
Select Add an exclusion, then choose File. This option excludes only one file per exclusion. [3]
Pick the file in the window that opens and confirm. Follow any on-screen prompts. [3]
For example, if Defender keeps flagging a small tool you built yourself, you would pick that one executable and nothing else. The file then appears in the exclusions list.
An exclusion is a gap in your protection, because every exclusion lowers your defenses. [1] Only exclude a file you trust, and keep the list short. Microsoft advises using exclusions sparingly and only to resolve a specific problem, such as a performance or app compatibility issue. [1]
What is different on Windows 10?
On Windows 10, the only change is how you reach Windows Security; the exclusion steps themselves match Windows 11.
Open Settings from the Start button, select Update & Security, then choose Virus & threat protection in the left pane. [4] The path is Settings > Update & Security > Virus & threat protection.
From there, select Manage settings, scroll to Exclusions, choose Add or remove exclusions, and then Add an exclusion. [4] Pick File to exclude a single file. [3] For the next step, see How to Remove an Exclusion From Windows Defender.
You can also open the Windows Security app by searching the Start menu for “Windows Security” and continue from Virus & threat protection. [3]
One more point: Windows 10 is past end of support, so it no longer receives regular updates from Microsoft. If your PC can run Windows 11, upgrading is the better long-term choice, especially since every exclusion you add leaves a small gap in protection.
Which mistakes should you avoid?
The most common mistakes all come down to making the gap bigger than it needs to be. Microsoft says every exclusion is a protection gap that lowers your defenses, so use exclusions sparingly. [1]
Excluding a whole folder when one file is enough
If Defender flags one file, exclude that file, not the folder around it. A folder exclusion also skips everything you save there later, such as downloads that have nothing to do with the original problem.
Excluding a file you have not verified
Define an exclusion only to resolve a specific problem, such as a performance or app compatibility issue. [1] A warning you simply want to go away is not a reason. If you do not know where the file came from, leave it alone.
Forgetting the exclusion later
Microsoft advises against excluding something just because you think it might be a problem later. [1] Once the problem is fixed, the exclusion has no job left. Open Add or remove exclusions now and then, and remove entries you no longer need.
Ready to add your exclusion?
Remember the path: Windows Security > Virus & threat protection > Manage settings > Add or remove exclusions. From there, add the one file you trust and nothing more.
Keep the list short. Microsoft says every exclusion is a protection gap, so you should define one only to resolve a specific problem, such as a performance or app compatibility issue. [1] Once the problem is gone, remove the exclusion so Defender checks that file again. Open that menu now and add your file. For the next step, see How to Add a File Exclusion in Windows Defender.
