SharePoint Online Site URL Rename is here

Being able to rename a SharePoint Online Site URL is a feature that has long been asked for on UserVoice, receiving over 4500 votes. Currently, it is still only possible to rename the Site name part of the URL and there is an eerie silence around the tenant name part of the URL which is almost more important with the speed at which businesses change, re-brand, merge, acquire and split. Hopefully, we’ll here some news on that soon, perhaps some big announcement at this years Ignite.

Renaming a Site

Renaming a Site is unbelievably easy and can be done in either the SharePoint Online Admin Center or via PowerShell. 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.

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.

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.

Renaming a Site in 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
Credit where its due
Featured Image by Émile Perron on Unsplash

Copyright © 2020 - Martin Day