How to Configure Windows Search Indexing Options in Windows 11 and 10 (2026)

·
5 min read

Help Desk Geek is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Windows Search skips files you know exist, especially code files like .php, .java, .aspx, and .html, because the indexer either doesn’t include the right folders or isn’t set to index file contents. Here’s how to fix that in Windows 11 and Windows 10.

How to Access Indexing Options in Windows 11

In Windows 11, indexing settings live in Settings, not the Control Panel. Here’s how to get there and check what’s currently being indexed.

  1. Press Windows + I to open Settings.
  2. Go to Privacy & security > Searching Windows.
  3. At the top, you’ll see the Indexed count and the Size on disk for the index database (Windows.db).
Windows 11 Settings > Privacy & security > Searching Windows, showing indexed item count and size on disk

In Windows 10, the path is Settings > Search > Searching Windows instead.

Fix #1: Add or Remove Indexed Locations

By default, Windows indexes your user folders and libraries. If you’re a developer with code on a separate drive or network share, those folders won’t be indexed unless you add them manually.

  1. Go to Settings > Privacy & security > Searching Windows (Windows 11) or Settings > Search > Searching Windows (Windows 10).
  2. Scroll down and click Advanced indexing options. The classic Indexing Options dialog will open.
  3. Click Modify.
  4. In the folder tree, check any drive or folder you want to include, including network drives and external hard drives.
  5. Click OK.
Indexing Options dialog in Windows 11 showing the Modify button and a list of currently indexed locations
Indexed Locations folder picker with a network drive checked and OK button visible

Depending on how many files are in the new location, it may take several minutes or longer for the indexer to catch up. You can check progress back in Settings > Privacy & security > Searching Windows.

Fix #2: Index File Contents for Code and Text Files

Adding a folder to the index only indexes file names and properties by default. If you want to search inside files – essential for code files like .php, .java, or .html – you need to enable content indexing for those file types.

  1. Go to Settings > Privacy & security > Searching Windows > Advanced indexing options.
  2. Click Advanced, then select the File Types tab.
  3. Scroll through the list to find your file extension (e.g., .php, .java, .aspx). If it’s not there, type the extension in the field at the bottom and click Add.
  4. Select the extension in the list, then choose Index Properties and File Contents in the radio buttons below.
  5. Click OK.
Advanced Indexing Options dialog showing the File Types tab with .php selected and "Index Properties and File Contents" radio button chosen

After saving, Windows will re-index the affected file types. Searches inside those files should start returning results once indexing finishes.

Fix #3: Exclude Folders to Reduce Index Bloat

A bloated index, one that’s grown beyond roughly 10% of your total content size, can slow searches down or cause missed results. Excluding folders you don’t need to search is the fastest way to trim it.

  1. Go to Settings > Privacy & security > Searching Windows.
  2. Click Add an excluded folder.
  3. Browse to the folder you want to exclude (e.g., a node_modules or build output directory) and click Select Folder.
Windows 11 Searching Windows settings with "Add an excluded folder" option highlighted and a folder picker dialog open

Repeat for any other folders you don’t need indexed. This is especially useful for developers with large dependency folders that inflate the index without adding useful search results.

Fix #4: Adjust Index Settings (Encrypted Files, Diacritics, Index Location)

The Index Settings tab gives you a few additional controls worth knowing about.

  1. Go to Advanced indexing options > Advanced > Index Settings tab.
  2. Check Index encrypted files if you need to search inside BitLocker-encrypted content.
  3. Check Treat similar words with diacritics as different words if you work with multilingual content and need precise matching.
  4. To move the index database to a faster drive, click Select new under Index location, choose the target drive, and click OK. Windows will rebuild the index in the new location.
Advanced Indexing Options > Index Settings tab showing encrypted files checkbox, diacritics option, and index location with Select New button

Moving the index to a faster SSD can noticeably speed up search on systems where the OS drive is slower than a secondary drive.

Fix #5: Rebuild the Index (When Search Results Are Wrong or Missing)

If Windows Search is returning stale results, missing files you know exist, or behaving erratically after an upgrade, rebuilding the index clears the database and starts fresh.

  1. Go to Advanced indexing options > Advanced > Index Settings tab.
  2. Click Rebuild under Troubleshooting.
  3. Click OK on the confirmation prompt. Windows will delete and recreate the index.
Advanced Indexing Options > Index Settings tab with Rebuild button highlighted and confirmation dialog visible

Rebuilding can take anywhere from a few minutes to over an hour depending on how many files you have. Search results may be incomplete until the rebuild finishes, you can track progress in Settings > Privacy & security > Searching Windows.

Fix #6: Make Sure the Windows Search Service Is Running

Some antivirus tools and PC optimizer apps disable the Windows Search service (wsearch), which stops indexing entirely.

  1. Press Windows + R, type services.msc, and press Enter.
  2. Scroll down to Windows Search.
  3. Check that the Status column shows Running and Startup Type shows Automatic (Delayed Start).
  4. If it’s stopped, right-click Windows Search and select Start.
  5. If the startup type is wrong, right-click > Properties, set Startup type to Automatic (Delayed Start), click Apply, then Start the service.
services.msc with Windows Search service highlighted, showing Status as Running and Startup Type as Automatic (Delayed Start), with right-click context menu visible

Alternative: Use Everything for Instant File Search

If Windows Search continues to frustrate you, especially on large codebases, Everything by voidtools is worth trying. It uses the NTFS change journal to index file names almost instantly with no noticeable overhead, and it supports regex and file type filters. It doesn’t index file contents by default, but for finding files by name or extension it’s dramatically faster than the Windows indexer.

For content searches inside code files, Select-String in PowerShell is another solid option that bypasses indexing entirely:

Get-ChildItem -Recurse -Filter "*.php" | Select-String "your_keyword"

This searches inside every .php file in the current directory tree and returns matching lines — no index required.

Conclusion

For most people, Fix #2, enabling Index Properties and File Contents for the right file types is what makes Windows Search actually useful for code and text files. If search results are stale or broken after a Windows update, Fix #5 (Rebuild) usually clears it up. If indexing keeps stopping on its own, check the Windows Search service in Fix #6 first as an optimizer or antivirus is likely the culprit.