- Published on
Perform a Site swap from SharePoint Admin center
- Authors
- Name
- Nicolas Kheirallah
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
- Visit SharePoint Admin Center
https://yourtenant-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/home
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
Add URL for your new site and press Save
This can take a small while as something in the background will run.
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