Prevent Documents from Appearing in Sharepoint Search

Written By Kazi Md Mehedi Hasan

Sometimes documents in SharePoint need to have restricted access due to privacy reasons. Excluding such files in the search result is a great way to achieve that.

More often, it may feel convoluted to find the correct settings to make unwanted organization members avoid confidential documents.prevent-documents-from-appearing-in-sharepoint-search

In this article, I’m going to walk you through the process of how to prevent documents from appearing in SharePoint search.

Key Takeaways

  • It’s sometimes necessary to be able to hide sensitive documents from the mass.
  • Hide documents from the SharePoint search, setting up unique permission for a library or folder.
  • Switch off site and library-level search indexing to exclude documents in the search result.

So, Let’s Exclude Sensitive Documents in SharePoint Search

Imagine you are an HR manager, and you uploaded a document just for the HR department only. The idea here is no one else should come across this confidential file accidentally, even if they search for it by name on the site.

To achieve this, you can approach multiple ways to stop this document from showing up in SharePoint search.

Follow the methods below:

Method 1: Employ Unique Permission on A Library or Folder

The Document Library or a folder inside it inherits permission from the parent, which is the Communication or Team site in Sharepoint. By lifting off the inheritance, the search result availability of a library or a folder can be restricted.

Unique Permission for a Document Library

  • Go to the document library you want to exclude in the SharePoint search.
  • Click on the gear icon in the top right corner to open SharePoint Settings.navigate-to-document-library-and-access-settings
  • Navigate to Library settings > More library settings.sharepoint-settings-menumore-library-settings-sharepoint
  • Click on Permissions for this document library under Permissions and Management.permission-management-sharepoint
  • Choose Stop Inheriting Permissions from the top to create a unique permission for the document library.
  • Click Yes in the confirmation prompt.confirm-disable-inheritance.jpg

Voilà! A unique permission for your document library is created successfully, and the parent will no longer pass down permission to this library.

However, if you want to re-enable the permission inheritance, click on Delete Unique Permissions navigating through the same settings.delete-unique-permissions-in-sharepoint

Imply Unique Permissions on a Folder

  • Get to a document library and select the folder you want to restrict from showing up as a search result in SharePoint.
  • Click on the i icon at the right of the screen. The folder settings menu will slide in from the right of the screen.
  • Press on the Manage access text under Has access sub-menu.manage-folder-access-sharepoint
  • Choose Advanced from the newly appeared floating window.manage-access-advance-folder-settings-sharepoint
  • Select Stop Inheriting Permissions from the top and confirm from the next prompt.stop-inheriting-permission-for-folders-sharepoint]

Next time you search for this folder, it won’t appear in the result.

Method 2: Deactivate Library Level Search Indexing in SharePoint

You can easily hide contents from the search result when inside a Document library in SharePoint.

Here’s how to disable library search indexing in SharePoint:

  • Reach out to a library on your SharePoint site.
  • Click on the gear icon at the top right section to expand Settings.sharepoint-settings-menu
  • Access Library settings > More library settings.sharepoint-settings-menumore-library-settings-sharepoint
  • Open Advanced Settings under General Settings.sharepoint-advanced-settings
  • Scroll down and find the Search section.
  • Choose No to Allow items from this document library to appear in search results option.disable-document-from-appearing-in-sharepoint-search
  • Scroll down to the bottom and click OK to save the changes.

Method 3: Remove SharePoint Search at the Site Level

It’s also possible to hide the entire site from the SharePoint search result. To do this the following instructions will help you.

  • Open SharePoint Settings with a click on the gear icon.
  • Navigate to Site information > View all site settings.site-information-sharepoint
  • Click on Search and offline availability under Search settings.search-and-offline-availability-sharepoint
  • Select the No radio button under Allow this site to appear in search results option.disallow-site-appearance-in-search-result
  • Hit OK to save the changes.

Note: Disabling site and library level search will prevent the parent as well as the contents from emerging while searching with specific keywords. But members with proper permission for these libraries or sites can still access them.

About The Author
Kazi Md Mehedi Hasan is a tech blogger with a passion for all things technology. When you define an alpha geek personality, it’s impossible to make a single statement without mentioning his name.He expresses his knowledge and experience on blogs covering the latest tech news, products, and software releases. He is always scouting for the next big thing in technology and shares his honest opinions. Follow him to stay updated on the tech world.

Leave a Comment