Skip to content
Yourmodernworkplace

Perform a Site swap from SharePoint Admin center

November 10, 2021

So when working with Viva Connection you might have created a seperate Home site for development while your old one lives on until you're done. When you are done, you might wanna swap places so the new site get's the root URL. This is how you do it

Admin Center

  1. Visit SharePoint Admin Center
   https://yourtenant-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/home
  1. Press Active sites

  2. Select Your root Site,

https://yourtenant.sharepoint.com/
  • Make sure it isn't a hub site.
  • Make Sure there isn't any retention policies in place for those two sites for now
  • Remove the site as a Home Site for now

  1. Add URL for your new site and press Save

  2. This can take a small while as something in the background will run.

  3. When the site swap is done, I recommend that you reindex the site. Some webpart and search can be cause Issues first 24-48 hours

Powershell

First you need latest SharePoint Module

Update-Module Microsoft.Online.Sharepoint.PowerShell -Force
Invoke-SPOSiteSwap`
-SourceURL https://yourtenant.sharepoint.com/sites/newSite `
-TargetURL https://yourtenant.sharepoint.com `
-ArchiveURL https://yourtenant.sharepoint.com/sites/oldSite -Force