SharePoint Search hide (not exclude) from global search

Shri-6058 326 Reputation points

Hello, will you please let me know how I can customize to not to display one subsite results in the main SharePoint 2013 global Search? I know that exclude rule will remove all results but I am using Search API to return results for that specific subsite document libraries. Thats why I don't want to stop crawling/indexing content. If I exclude subsite, my custom search API also returns no result.

Please advise

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,273 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,052 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,591 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,864 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Trevor Seward 11,691 Reputation points

    The only way to exclude content from global/Microsoft Search is to set the no crawl flag which would break your Search API. Unfortunately the capability you're asking for doesn't exist outside of using permission to prevent users from accessing the content.

    0 comments No comments

  2. Jerryzy 10,566 Reputation points

    Hi @Shri-6058 ,

    Agree with trevor's statement, if want to exclude subsite result disappear in the global search, the only way is set in "Search and offline availability"->"Allow this site to appear in search results?" -> No.

    But it will also break the search API to return sub site document librarys' results.

    Best Regards

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Shri-6058 326 Reputation points

    Thank you so much both of you.
    What if I go with a custom search box using custom template - someone explained here: but not sure if we can hookup the global search with this.

  4. Shri-6058 326 Reputation points

    Thank you again. So now that I cant do anything from SharePoint configuration/customization side, how about executing Search API impersonating administrator and remove as soon as the query returns result/display? Also, remove everybody's permission for the library to make sure it wont display in global search but ensure crawling/indexing is enabled. I beleieve it should work right?