How to Change a SharePoint Site URL

This How-To Guide will show you how to change the URL of a SharePoint Site. Changing a Site URL is unbelievably easy and can be done in either the SharePoint Online Admin Center or via PowerShell.

Change the URL in the SharePoint Admin Center

To rename a site URL via the Admin Center you need to login as a Global Administrator or SharePoint Administrator.

On the Active Sites screen, select the Site you want to rename and view the Site Properties. On the Site Properties you will notice there is now a ‘Edit’ link next to the Site URL as seen in the screenshot below.

Note!
Sites that have a Retention Policy set on them cannot be renamed.

Edit SharePoint Site URL Menu

When you click the ‘Edit’ link you will be presented with the ‘Change Address’ pane. Enter a new URL for the Site and SharePoint will go off and check that the URL is available. If a valid URL is entered, you can then click Save to rename the Site.

Enter a new Site Address

When you click ‘Save’ you will be asked if you also want to enter a new Site Name. This is not required and will just present you with the Site Name pane.

In my experience playing with this, the time it takes to rename the Site can vary from a couple of seconds to a few minutes. Once complete, you will see that the URL has changed in the properties pane.

Note!
The original URL of a Site does not become available for creation as detailed in “Sharing Links and Sync” section below.

Change the URL using PowerShell

I can’t think of many scenarios where you would want to wholesale change a set of Site URLs, however, it is possible to change the Site URL in the latest version of SharePoint Online PowerShell, as shown in the following example.  

$oldSiteURL = "https://tenant.sharepoint.com/sites/HumanResources"
$newSiteURL = "https://tenant.sharepoint.com/sites/HR"
Start-SPOSiteRename -Identity $oldSiteURL -NewSiteUrl $newSiteURL
Output: 

CurrentSiteUrl : https://tenant.sharepoint.com/sites/HumanResources
NewSiteUrl     : https://tenant.sharepoint.com/sites/HR
NewSiteTitle   :
RenameID       : 12345678-44df-4e81-9135-f390c16fbf6f
State          : NotStarted
TriggeredBy    : sa@martinday.co

You can then get the status of the rename by using ‘Get-SPOSiteRenameState’, as follows:

Get-SPOSiteRenameState -Identity $oldSiteURL
Output:

RenameID                                State
--------------                          --------
12345678-44df-4e81-9135-f390c16fbf6f    InProgress

Sharing Links and Sync

Both Sharing Links and OneDrive sync continue to work after a Site Rename. To maintain existing Sharing Links, SharePoint will create a redirect site under the hood. What this means is that the original URL is not freed up by renaming the Site, it is reserved to support the redirect of links. This can be seen if you fetch the original SharePoint site in PowerShell.

Title           LockState    Owner
-----           ---------    -----
RedirectSite    ReadOnly     SHAREPOINT\system

Copyright © 2020 - Martin Day