Requirement: Disable subsite creation in SharePoint Online.
How to enable subsites in SharePoint Online?
The traditional information architecture in SharePoint site collections and subsites is site collections have a top-level site and may have a number of sub-sites underneath. However, the recent recommendation from Microsoft is to avoid subsites and create site collections for different segments of your business and group related sites with Hub sites if needed. This is because you can manage site features such as permissions, storage, Add-ons, services, sharing, etc., at the site collection level. So, it’s a good idea to restrict the subsite creation option at the tenant level. You can turn off subsite creation from the SharePoint Online Admin Center.
- Login to SharePoint Online Admin Center >> Click on Settings >> Click on “Classic settings page” link.
- On the settings page, under the “Subsite creation” section, we’ve:
- Disable subsite creation for all sites (Renamed from: Hide the Subsite command) – Turning off SharePoint subsite creation on all sites
- Enable subsite creation for classic sites only (Renamed from: Show the Subsite command only for classic sites) – Turning on SharePoint subsite creation only on Classic sites
- Enable subsite creation for all sites (Renamed from: Show the Subsite command for all sites) – Turning on SharePoint subsite creation on all sites
Select “Hide the subsite command” and then click on the “Save” button at the bottom of the page to commit your changes. This disables the “subsite” option from the site contents page. If you want to enable subsite creation in SharePoint Online, set this option to “Show the subsite command for all sites”.
These changes could take some time to reflect. You can still group site collections using Hub Sites in SharePoint Online, allowing you to connect multiple sites in one manageable structure without using subsites.
And if the user tries to navigate to the URL to create a subsite directly, E.g., https://tenant.sharepoint.com/_layouts/15/newsbweb.aspx, SharePoint Online displays an error message: “New subsites are not available for your organization. Create a new site instead.”
It is worth mentioning that Microsoft recommends creating Hub Sites instead of Subsites to organize sites in SharePoint Online!
Any existing SharePoint Online site can be promoted as a Hub either from the SharePoint Admin center by selecting the site and clicking on “Register as Hub Site” or with the PowerShell cmdlet Register-SPOHubSite.
More info: Create a hub site in SharePoint Online
Adding a new subsite in SharePoint Online is easy! Just log in to your SharePoint Online site collection where you want to add the new subsite >> Click on the “Settings”, Select “Site Contents”. On the site contents page, click on the “New” button in the toolbar>> Select Subsite. Enter a name and description for your new subsite, then choose other details, then click on “Create”.
More info: Create a modern subsite in SharePoint Online