Tech

[Solved] How to change the root site URL in SharePoint online

[Solved] How to change the root site URL in SharePoint online

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

  1. 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:

      powershell

      Connect-SPOService -Url https://<your-domain>-admin.sharepoint.com
    • Enter your admin credentials when prompted.
  2. Check the current root site URL:
    • Run the following command to confirm the current root site:

      powershell

      Get-SPOSite -Identity https://<your-domain>.sharepoint.com
  3. Replace the root site with a new site:
    • Use the following command to replace the current root site with a new site:

      powershell

      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
      • SourceUrl

        : URL of the site you want to become the new root site.

      • TargetUrl

        : URL of the current root site.

      • ArchiveUrl

        : URL where the existing root site will be archived. Ensure this URL does not exist yet; it will be created during the swap.

  4. Verify the operation:
    • After running the command, the root site should be swapped. Verify the operation by navigating to the root site URL (
      https://<your-domain>.sharepoint.com

      ) and checking if it reflects the new site.

  5. Check the status (optional):
    • If you want to monitor the status of the site swap, you can use:

      powershell

      Get-SPOSiteSwapStatus

      This command shows the status of any ongoing or recent site swaps.

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.

More info can be found on the link below.

https://learn.microsoft.com/en-us/sharepoint/modern-root-site

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button