Site Swap feature on Office 365 is currently rolling out (August 2019) to tenants. Site Swap allows an admin to replace tenant’s root site or default search center site with another, already created site collection located on the tenant. Typically this feature will be used to replace classic tenant root site collection with a modern one. Feature is not supporting swapping hub sites or Office 365 Group connected team sites. A hub site can be swapped to tenant root with couple of steps.

First unregister your hub site on SharePoint Admin Center.

After unregistering a hub it seems that hub connection on connected sites is removed. Don’t worry, configuration remains.

Next, run a PowerShell script to start site swap operation to move your site to tenant root.

Invoke-SPOSiteSwap -SourceUrl -TargetUrl -ArchiveUrl

Site swap will be a background job and it will take some time once it’s completed. When your source site is moved and working on tenant root, you can register it back to a hub site. On SharePoint admin center site might still refer to it’s original URL, but if site is responding on tenant root already you can register it.

Once site swap is fully complete, admin center view is updated. Hub site link on hub navigation will be also updated to refer to tenant’s root after a while.

Couple of things to notice before the swap:

  • Featured links displayed on SharePoint Home are stored on a list on the site and are moved to archive location. If you didn’t check and copy links before swap operation, you can found them on a hidden list on archived site, for example:
  • Check that source site has same policies and permissions as the target root site.

I’m won’t suggest running site swap during office hours, if tenant root or source site is actively in use. After the swap source site URL is returning 404 to end-users, so please also remember communicating the change to end users. Source URL will be available after the swap, so one option would be creating a new, temporary site to that URL and inform there about the new location or even do a redirect.