Changing the root site URL in SharePoint Online involves replacing the existing root site with a different site. This process is straightforward but requires admin permissions. Here’s a step-by-step guide:
Prerequisites
- Global or SharePoint admin permissions: You need to be a global or SharePoint admin in Microsoft 365.
- New site created: Ensure the new site you want to use as the root site is already created. It can be either a Communication site or a Modern Team site (without an Office 365 group).
Steps to Change the Root Site URL
- Connect to SharePoint Online using PowerShell:
- Install the SharePoint Online Management Shell if you haven’t already.
- Open the SharePoint Online Management Shell and run the following command to connect:
Connect-SPOService -Url https://<your-domain>-admin.sharepoint.com
- Enter your admin credentials when prompted.
- Check the current root site URL:
- Run the following command to confirm the current root site:
Get-SPOSite -Identity https://<your-domain>.sharepoint.com
- Replace the root site with a new site:
- Use the following command to replace the current root site with a new site:
Invoke-SPOSiteSwap -SourceUrl https://<your-domain>.sharepoint.com/sites/newroot -TargetUrl https://<your-domain>.sharepoint.com -ArchiveUrl https://<your-domain>.sharepoint.com/sites/archive-root
-
: URL of the site you want to become the new root site.
-
: URL of the current root site.
-
: URL where the existing root site will be archived. Ensure this URL does not exist yet; it will be created during the swap.
- Verify the operation:
- Check the status (optional):
Important Considerations
- Timing: The site swap process usually completes within a few minutes, but it might take longer depending on the size of the sites involved.
- Permissions: Ensure that permissions and navigation are set appropriately on the new root site to avoid any access issues.
- Customizations: Verify any customizations or integrations on the new site to ensure they work correctly after the swap.
By following these steps, you can effectively change the root site URL in SharePoint Online. This method allows you to modernize your root site or replace it with a more suitable one without significant downtime.