0

How to exclude a site from search result source but keep its subsites in search results? I have a site collection in which i used to make team sites and project sites. In search results i want that all the subsites in that site collection should appear but that site collection needs to be excluded from search results. I tried the query as

-Path:siteurl 

But this query excludes all the subsites of that site collection. Please help?

  • Are you on-prem or SPO? Although I would not recommend having a "secure root site" with public sites below it, have you tried just adding security to the root and opening up the sub sites? – Matthew McDermott Jun 29 '18 at 13:40
  • I'm on on-prem currently. Actually i have created a site and named it to "teamsite" and in that site i allow users to create sites. Also i want to show the users all the teamsites created in a page so i created a result source for that. But that root site ("teamsite") is coming in results. – Sahil Jhamb Jul 2 '18 at 8:46
1

Could it be an option just to exclude the lists on the root site from search (list settings - > advanced settings)?

0

Yes, i got that hint from excluding lists from search and found that if i want to exclude a site then i need to go to Site Settings > Search > Search and offline availability and settings, then setting the "Allow this site to appear in search results?" option to "No".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.