Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
SharePoint sites created before modern sites use a classic search box and classic search experience. Microsoft Search provides a modern search experience with personalized results and higher relevance.
Microsoft Search is recommended for all sites, including classic sites. However, if your classic sites use custom master pages or a customized classic search experience, Microsoft Search detects these customizations automatically and does not switch the site.
Classic sites that automatically switch to Microsoft Search
Classic sites start using Microsoft Search if all of the following are true:
- The site is based on the team site template (like STS#0 and STS#1).
- The site doesn't have the publishing feature turned on.
- The site doesn't use a custom master page (a different master page than oslo.master or seattle.master).
- The site has no active query rules other than those adding promoted results for the site, site collection, or tenant on the default result source.
- The site has no custom result types for the site or the site collection on the default result source.
- The site or the site collection isn't opted out of the switch using the SearchBoxInNavBar setting.
After the switch to Microsoft Search, classic pages in the site show the search box in the suite navigation bar and remove the classic search box from the page. When a user searches for a term, results appear in the modern Microsoft Search experience.
Staying with the classic search experience
If your site meets the criteria listed in this section but you don't want it to switch to Microsoft Search, you can opt out as the site or site collection owner. You can run these commands at any time, before or after the switch, to return to the classic search experience.
These commands use PowerShell with SharePoint PnP PowerShell extensions. To install the extensions, see Get started with SharePoint PnP PowerShell. Sign in to your site or site collection using this command:
Connect-PnPOnline -Url <yoursiteurl> -Interactive
# this will prompt you to sign in to your site. Use the site owner credentials.
To stay with classic search experience for a site, run the following command:
Set-PnPSearchSettings -Scope Web -SearchBoxInNavBar ModernOnly
# ModernOnly | Inherit
To apply the setting to all sites in a site collection, use this command:
Set-PnPSearchSettings -Scope Site -SearchBoxInNavBar ModernOnly
# ModernOnly | Inherit
Opting into Microsoft Search
For sites that don't meet the criteria in the previous section, or for specific sites in a site collection that opted to stay in classic, you can manually enable the Microsoft Search experience.
To change this setting for a specific site, you can use this command:
Set-PnPSearchSettings -Scope Web -SearchBoxInNavBar AllPages
# AllPages | Inherit
To apply the setting to all sites in a site collection, use this command:
Set-PnPSearchSettings -Scope Site -SearchBoxInNavBar AllPages
# AllPages | Inherit
Note
You can manually enable Microsoft Search only for a Team Site or Publishing Site (template IDs that contain STS, CMSPUBLISHING, BLANKINTERNET, and GROUP).