When you search for a file in SharePoint but cannot find it, the file might not be indexed by the search service. Indexing is the process where SharePoint crawls files and adds their content to the search catalog. Without indexing, the file will not appear in search results even if it exists in the library. This article explains how to verify whether a specific file is indexed and what steps you can take if it is not.
Key Takeaways: Verifying File Indexing Status in SharePoint
- Site Settings > Search and offline availability: Check if a library or list is set to allow items to appear in search results.
- Document library settings > Advanced settings: Confirm that the library allows indexing of all file types.
- Search by filename or content: Test indexing by searching for a unique word inside the file.
Why SharePoint Files Might Not Be Indexed
SharePoint uses a search service that crawls content sources such as site collections, libraries, and lists. The crawler reads file content and metadata, then adds them to the search index. A file is indexed only if the library allows search indexing, the file type is supported, and the file is not excluded by site-level settings. Common reasons a file fails to index include the library being configured to not show items in search results, the file type being blocked, or the file being placed in a folder that is excluded from crawling. Understanding these settings helps you diagnose why a file does not appear in search.
File Types Supported by SharePoint Search
SharePoint search supports many common file formats including .docx, .pdf, .pptx, .xlsx, .txt, and .html. Some file types such as .zip, .exe, or .iso are not indexed by default. If your file is in a supported format but still not indexed, check the library settings and site search configuration.
Steps to Check Whether a SharePoint File Is Indexed
- Open the document library
Navigate to the SharePoint site that contains the file. Go to the document library where the file is stored. - Check the library search settings
Click the gear icon in the top right corner and select Library settings. Under the General settings section, click Advanced settings. Look for the option Allow items from this document library to appear in search results? This must be set to Yes for any file in the library to be indexed. - Verify file type is allowed
In the same Advanced settings page, check the File types section. Ensure the file extension of your document is listed among the allowed file types. If it is not, add the extension or change the file format. - Check site search configuration
Go to Site settings by clicking the gear icon and selecting Site settings. Under the Search section, click Search and offline availability. Confirm that Allow this site to appear in search results? is set to Yes. Also check that Allow indexing of the site? is enabled. - Perform a search test
Type a unique word from the file content or the exact filename into the SharePoint search box. If the file appears in the results, it is indexed. If not, continue to the next steps. - Check folder-level indexing exclusions
Some libraries have folders that are excluded from search. Select the folder containing your file. Click the ellipsis (…) and choose Details. In the details pane, look for Search settings. If the folder is set to Do not index, change it to Index. - Use SharePoint Search Query Tool (PowerShell)
If you have SharePoint admin permissions, you can use PowerShell to query the search index directly. Run the following command in SharePoint Online Management Shell:Get-PnPSearchQuery -Query "filename:yourfile.pdf"
Replace yourfile.pdf with your actual filename. If the command returns results, the file is indexed.
If the File Still Does Not Appear in Search
SharePoint search crawl schedule is delayed
SharePoint Online search crawls continuously, but changes may take up to 15 minutes to appear. Wait for some time and test again. For on-premises SharePoint, crawl schedules are set by the administrator and can take hours.
File is in a checked-out state
If the file is checked out to a user, the search crawler might not index the latest version. Check the file status in the library. If it shows as checked out, have the user check it in.
File content is encrypted or contains binary data
SharePoint search cannot index encrypted files or binary content without text. If the file is password-protected or uses a custom binary format, it will not be indexed. Remove encryption or convert to a supported format.
Site collection search is disabled
In the SharePoint admin center, go to Search and verify that the site collection is not excluded from search. If it is excluded, re-add it and initiate a full crawl.
| Item | Indexed | Not Indexed |
|---|---|---|
| Library search setting | Allow items to appear in search results set to Yes | Set to No |
| File type | Supported extension like .docx or .pdf | Unsupported extension like .zip or .exe |
| Site search setting | Allow indexing of the site enabled | Disabled |
| Folder setting | Index folder set to Yes | Set to Do not index |
| File status | Checked in and published | Checked out or draft |
You now know how to verify if a SharePoint file is indexed using library settings, search tests, and PowerShell. Start by checking the library advanced settings and site search configuration. If the file still does not appear, examine folder exclusions and crawl delays. For persistent issues, ask your SharePoint administrator to review the search service application settings and trigger a full crawl.