Yes, you can add a file exclusion in Windows Defender so it skips a file you trust. Windows Defender Antivirus lets you exclude files, folders, file types and processes from scanning [1][2]. This helps most with false positives, when Defender flags or blocks something that is actually safe [1]. It also helps to read How to Remove an Exclusion From Windows Defender.
This article walks through the steps in Windows 11 first, then covers what changes in Windows 10, and explains how to pick the right kind of exclusion.
Keep in mind that an exclusion lowers your protection. Defender will not look at what you exclude, so use exclusions sparingly and only for items you know are safe.
Key takeaways
Exclusions are meant for false positives.
You can exclude a file, folder, file type or process.
Use as few exclusions as you can.
What should you know before adding an exclusion?
Only add an exclusion for a file you trust, usually one Defender keeps flagging by mistake. The feature exists for false positives, where Defender reports a virus in a file that is actually fine, or for items you simply do not want scanned. [3]
Excluded items are not scanned
When you exclude something, Windows Defender Antivirus stops scanning and blocking it. [1] That means if the file turns out to be malicious, or becomes infected later, Defender will not warn you about it.
Some pages even suggest using exclusions to store cracks and hidden hacks. [3] Treat that as a red flag, not a tip: those are exactly the files that should stay under Defender’s watch.
Rule out a real threat first
Before you add anything, be sure the detection is a false positive. Ask yourself where the file came from. A spreadsheet macro you wrote yourself or a tool from a vendor you know is a reasonable candidate. A download from an unfamiliar site is not.
If you are unsure, leave Defender’s detection in place and get the file from a source you trust instead.
Choose the narrowest exclusion
Defender lets you exclude a specific file, an entire folder, a file type such as .pdf, .mp3 or .exe, or a process. [3] Each step up covers more, so it also hides more from scanning.
If one file triggers the alert, exclude only that file. Excluding its whole folder or the .exe file type would leave far more unscanned than the problem requires.
How do you add a file exclusion in Windows 11?
You add a file exclusion in Windows 11 through the Windows Security app, in about four steps.
Open Start, then Settings, then Windows Security, and select Virus & threat protection. You can also open the Windows Security app from its icon in the notification area on the taskbar. [1]
Under Virus & threat protection settings, choose Manage settings. [4]
Scroll down to the Exclusions section and select Add or remove exclusions. [4]
Choose Add an exclusion, then pick File, and select the file you want Defender to skip. [4]
The menu offers four choices: File for one specific item, Folder for an entire folder, File Type for extensions such as .pdf, .mp3 or .exe, and Process for background tasks. [4] For a single flagged file, File is the one you want.
Once you pick it, the file appears in the exclusion list. For example, if Defender keeps flagging a small utility you built yourself, you would browse to that one .exe and select it. [4]
Safety note
An excluded file is no longer scanned by Defender, so only exclude files you trust. If the file turns out to be harmful, Defender will not catch it.
What is different in Windows 10?
On Windows 10, the only change is how you reach Virus & threat protection. After that, the Exclusions steps match Windows 11.
Getting to Virus & threat protection
Open the Start menu and select Settings. On the Settings page, choose Update & Security. [3] In the left pane, click Virus & threat protection. [4]
From there, follow the same path as in Windows 11: under Virus & threat protection settings, click Manage settings, scroll to Exclusions, and click Add or remove exclusions. [4] Then choose Add an exclusion and pick File, Folder, File type or Process. [4]
Removing an exclusion works the same way too: click the entry in the list, then click Remove. [3]
Windows 10 is past end of support
That makes every exclusion matter more, because a skipped file is one that a less current system is not checking. Keep your protection up to date, or plan an upgrade to Windows 11.
If you stay on Windows 10 for now, keep exclusions few and narrow, and use File rather than Folder when one file is the problem.
Should you exclude a file, folder, file type or process?
Choose the narrowest exclusion that stops the false positive. Windows Defender Antivirus lets you exclude files, folders, file types and processes from scanning. [1]
Option | What it covers | Risk if the item is unsafe | Best for |
|---|---|---|---|
File | One specific item | Low: limited to a single item | A single program or document Defender wrongly flags |
Folder | Everything inside the folder | Higher: anything placed there later goes unscanned | A project folder you fully control |
File type | Every file with a given extension | Broad: affects files all over the PC | Rare cases where one format keeps triggering alerts |
Process | A running program | Broad: depends on what that program does | A trusted app that Defender keeps interrupting |
A file exclusion is the safest starting point. If Defender flags one tool, such as a small utility you downloaded from its developer, exclude only that file and leave everything around it scanned.
A folder exclusion covers everything inside, so the risk grows with every file that lands there. Excluding a folder you use only for one trusted project is far safer than excluding a general-purpose location.
File type and process options also exist in the same exclusions menu. [1] They reach further than a single file, so treat them as a last resort.
Start with a file exclusion. Move to a folder only if the problem keeps returning for several files in the same place.
What mistakes should you avoid with exclusions?
The biggest mistake is making an exclusion wider than the problem it solves. Three habits cause most of the trouble.
Excluding a whole drive or a broad folder
A folder exclusion covers everything inside it, so a folder like Downloads becomes a place where nothing is scanned. [3] That is where new, unvetted files usually land. If one program flags one file, exclude that file instead. The same logic applies to a whole drive, which hides far more than you intended.
Excluding files from unknown sources or cracks
Only exclude a file when you know it is a false positive, meaning Defender is flagging something harmless. [3] One guide even suggests using excluded locations to keep cracks away from Defender. [3] Don’t do that. A cracked program or a file from a stranger is exactly what Defender should be checking, and an exclusion means a real threat could sit there unnoticed.
Forgetting old exclusions
An exclusion keeps working long after you stop needing it. Maybe you excluded a file for a one-time install, or a project folder you finished months ago. Every leftover entry is a blind spot.
Review the list now and then. Open Windows Security, go to Virus & threat protection, choose Manage settings, then select Add or remove exclusions. To delete an entry, click it and select Remove. [3]
A good rhythm is to look at the list whenever you add a new exclusion. Remove anything you no longer recognize or need.
Common questions about Defender exclusions
Does an exclusion delete or restore a file?
Neither. An exclusion only tells Defender to stop scanning an item, so it can protect a file from further deletion once it is added. [3] It does not bring back a file Defender already quarantined. If a backup program’s file is missing from its expected location, check whether your antivirus quarantined it. [5]
Can you undo an exclusion?
Yes. Go back to Exclusions under Manage settings, click the entry, and select Remove. [3] Defender then scans that item again. You can repeat the same steps for each entry that sits in a different place. [3]
Do backup tools need exclusions?
Sometimes. Antivirus software can incorrectly flag or interfere with backup software, which may cause a failed backup job, unusually slow transfer speeds, a program that will not start, or missing backup destinations. [5] NovaBACKUP, for example, lists specific file types, executables and program folders to exclude from Windows Defender Antivirus to speed up backups. [5]
That vendor also notes that a custom temporary files folder set inside the software needs to be added to the exclusions too. [5] Add exclusions only if you actually see these symptoms, and follow your backup vendor’s own list rather than excluding whole drives.
Wrapping up
Remember one path: Windows Security > Virus & threat protection > Manage settings > Add or remove exclusions. That is where every exclusion is added, and it is also where you can see what is already excluded. To go further, see How to Add a File Exclusion in Windows Security.
Keep each exclusion as narrow as possible, such as one trusted file rather than a whole folder. Then come back to the list now and then and remove anything you no longer need, so Defender goes back to scanning it. Your next step: if a file is being flagged, make sure it is safe, then add just that file.
Sources
How to Add Files and Folders Exclusions in Windows Defender Antivirus?
Windows Defender will keep on working in background and will notify you when it requires your…
Excluding some files and folders from Windows Defender will protect them from deletion. This is…
How to exclude NovaBACKUP from Windows Defender Antivirus to speed up backups
