I am using search to find sites and then sub-sites/webs for a given user. Currently, the search is returning all users personal/My Sites and I don't want these in the results. Is there a way change the search query to exclude "My Sites" in the results? I need a generic solution so I can't add/modify query rules etc. I need it to work out-of-the-box.

I am using REST API and my current query looks like this:


2 Answers 2


Try adding NOT Path: http://mysite/* to your query where you use your My Site host address.


You can filter them out by using WebTemplate property like this:

(NOT WebTemplate:SPSPERS)

Tested in SP2016.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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