Creating Sites and Sub Sites in SharePoint Online (SPO)

 Team Site:

A team site can be created for teams to work on a project and share information with teammates. The team site will associate with a Microsoft 365 group which makes it easier for teammates to collaborate amongst each other.

We will create a new team site named SPOLab. You can follow the instructions below for the same:

  1. Go to admin.microsoft.com which should redirect to the Home Page of the M365 Admin Center.
  2. If not shown already, click on Show all tab under Admin centers to see all the admin centers and select SharePoint to go to the SharePoint Admin Center.
  3. In the SharePoint admin center, expand Sites, and select Active sites.
  4. Select +Create from the menu in the middle pane.
  5. Select Team site in the new window.

  6. Fill out the following site information and select Finish to complete the site creation:
    • Site Name: SPOLabs
    • Group Owner: Select yourself
    • As you see, other information is prefilled and can be edited, if needed, we'll keep it as is for this lab
  7. Once you click next, you'll be asked to add members and there we would add the members of a team to which we dedicate this space.

  8. Once we're done adding members and click Finish a new team site is created as https://domain.sharepoint.com/sites/SPOLabs 

Communication Site:
Communication sites are, as the name suggests, used to communicate with a larger audience. Typically, it is managed by a small group of members to broadcasts useful information like news, reports, status, documents, and more. When you create a communication site, a Microsoft 365 group is not created.

To try something new, we would be creating a communication site via PowerShell by following the below instructions:
  1. If you're connecting the SPO through PS for the first time, we'll have to install and import SharePoint module by the following commands:
    Install-Module Microsoft.Online.SharePoint.PowerShell
    Import-Module Microsoft.Online.SharePoint.PowerShell
  2. Connect to SPO with the following command:
    Connect-SPOService -URL https://domain-admin.sharepoint.com -Credential lchauhan@domain.com
    On the prompt enter your admin credentials
  3. Run the following command to check the available site templates:
    Get-SPOWebTemplate


    From the output, we can figure out the name for the communication site is SITEPAGEPUBLISHING#0.
  4. Now that we know the template name, we'll use it to create a new communication site "SPOProject" by running the following command:
    New-SPOSite -Url https://domain.sharepoint.com/sites/SPOProject -Owner lchauhan@domain.com -Title "SPOProject" -Template SITEPAGEPUBLISHING#0
Running the command would not give any output, but if we check a new communication site with URL https://domain.sharepoint.com/sites/SPOProject is created. Let's check it via PS by the following command:
Get-SPOSite
We can also double check in GUI which should represent as below:

That done, let's configure and design a hub site that helps us organize our intranet based on the project, department, division, or region.

Let's use the same site, SPOProject, to become the hub site for the new project business unit hosting the latest news and information for the unit by following the instructions below:
  1. Go to the SPO Admin Center and on the Active Sites page, selecting the SPOProject site, click on Hub to Register as a hub site:

  2. Enter the information asked, for instance SPOProjectHub for the Hub Name and select the individual users or security groups you want to allow to associate sites with the hub.

    If you leave the People who can associate sites with this hub box empty, any user can associate their site with the hub.

    We can also use the following command to achieve the same goal via PowerShell:
    Register-SPOHubSite -Site https://domain.sharepoint.com/sites/SPOProject -Principals lchauhan@domain.com

  3. Let's now design the hub site. We will navigate to the site SPOProject to notice that we now see the hub navigation bar at the top of the page


  4. Just for a test, lets create a link to see the news of the team/project. For that, select Add News link and fill out the details.
    For instance, we used the following details:

    • Address: https://domain.sharepoint.com/sites/News
    • Thumbnail: Blank (You can upload if you need anything specific or to beautify it)
    • Title: News
    • Description: This shows news
    • Select POST once done with filling out information


  5. The news would show up something as below, but as we do not have any content to it, it would fail to load giving us an error 404. 
Let's associate a site with the hub site now by following the steps below:
  1. Go to the Active Sites in SPO Admin Center and select SPOLabs site that we created earlier
  2. Select Hub and then select Associate with a Hub OR in the flyout, directly click on Edit under Hub Association


  3. In the Edit hub association window, select SPOProject in the dropdown menu and Save.

  4. Browse to SPOLabs team site, you can see the hub navigation bar shows up at the top of the page.


    We can also use the following command to achieve the same goal via PowerShell:
    Add-SPOHubSiteAssociation https://domain.sharepoint.com/sites/SPOLabs -HubSite https://domain.sharepoint.com/sites/SPOProject

    Hope this was useful and try to play with more features of SPO sites and hub sites😊

Comments