At times, you might not want to include a particular folder or path in Windows Search. You can follow this tutorial to prevent users from indexing specific paths in the Search index on Windows 10 computer. It is possible to create this limitation using the Registry Editor and the Local Group Policy Editor.
Let’s assume that you have some confidential files on your computer, and you do not want them to be included in Windows Search. You can enter a common folder path such as D:\my-folder\ (where D is a drive) so that other people cannot index any sub-folders that are pleased inside the my-folder. For example, users or even you cannot include a path like this: D:\my-folder\mysubfolder.
Prevent users from indexing specific paths in Search Index using Registry
To prevent users from indexing specific paths in Search Index, follow these steps:
- Press Win+R to open the Run dialog.
- Type regedit, press Enter, and click the Yes option.
- Navigate to Windows in HKEY_LOCAL_MACHINE.
- Right-click on Windows > New > Key.
- Name it Windows Search.
- Right-click on Windows Search > New > Key.
- Name it as PreventIndexingCertainPaths.
- Right-click on it > New > String Value.
- Name it as your folder path.
- Double-click on it to set the Value data.
- Enter the Value data as your folder path.
- Click the OK button.
Let’s check out these steps in detail.
At first, you have to open the Registry Editor on your computer. For that, press Win+R > type
regedit > hit the Enter button, and click on the Yes option in the UAC prompt.
Once it is opened, navigate to the following path:
Right-click on the Windows key, select New > Key and name it as Windows Search. Now you have to create a sub-key inside Windows Search. For that, right-click on it, select New > Key, and name it as PreventIndexingCertainPaths.
Next, right-click on this latest key and select New > String Value. You have to name this String Value after your folder path.
For example, if your desired folder path is D:\my-folder, you must enter the name as file:///D:\my-folder\*. For your information, adding the *, in the end, makes a wildcard entry, allowing users to block the entire folder and all subfolders. Also, if you want to block a network shared folder, you can enter otfs instead of the file.
Next, you have to set the Value data of the String Value. For that, double-click on the String Value, enter the same folder path in the empty box, and click the OK button to save the change.
That’s it! Now you have to restart your computer to get the change.
Read: How to disable Advanced Search Indexing Options in Windows 10.
Block users from indexing specific paths in Search Index using Group Policy
To block users from indexing specific paths in Search Index using Group Policy, follow these steps:
- Press Win+R > type gpedit.msc and press Enter button.
- Go to Search in Computer Configuration.
- Double-click on the Prevent indexing certain paths setting.
- Select the Enabled option.
- Click on the Show button.
- Enter the folder path.
- Click the OK button twice.
To get started, press Win+R > type
gpedit.msc and hit the Enter button to open the Local Group Policy Editor on your computer. Next, navigate to the following path:
Computer Configuration > Administrative Templates > Windows Components > Search
Double-click on the Prevent indexing certain paths setting and select the Enabled option.
Next, click on the Show button, and enter the desired folder path like this:
Then, click on the OK button twice to save the change.
That’s it! Hope this article helped you.