Site Rename Addresses a Long-Overdue Customer Request
Site owners have been able to change many properties of their sites (like logos, display names, and so on), but they haven’t been able to change site URLs. But now, the modern SharePoint Admin Center includes the ability to update a site name. You still can’t change the tenant’s domain name (the tenant.sharepoint.com part of the URL); only the site name part can be renamed.
SharePoint administrators are able to rename on-premises sites with PowerShell (here’s one example). One workaround used is to create a new site and copy everything from the old to the new. This works, but it isn’t a recommended approach when sites belong to Office 365 Groups (including Teams) because the properties of the group objects include pointers to the SharePoint sites. For example:[crayon-5d5c6bbd3121f732193692/]
The SharePointNotebookURL is blank if the shared OneNote notebook has never been used by the group.
Different Nature of SharePoint Online
All of this proves that SharePoint Online is a more complex environment than SharePoint on-premises. Apart from working inside the multi-tenant Office 365 ecosystem, SharePoint Online is a provider of document management services to other apps while on-premises SharePoint Server is the center of its own ecosystem.
Office 365 tenants have asked Microsoft to allow the rename of sites for many years. When an Office 365 group or team is created, the SharePoint site is named after the group or team. You can rename an Office 365 group or team later to reflect changing circumstances (for example, a project used to be called “Alpha Contoso” and now is “Better Products”), but you couldn’t rename the site.
Renaming a Site
The ability to rename a site is a preview feature, so it’s not yet generally available within Office 365. To rename a site, log on as a tenant global administrator, launch the Modern SharePoint Admin Center, go to Active Sites, and select the site you want to rename, and open the properties pane (Figure 1). If the edit link is grayed out, it might be that the site is within the scope of a retention policy.
Click Edit to begin the rename process. Now overtype the current name of the site to enter a new name. SharePoint checks that the new name is available and if everything’s OK, click Save to rename the site.
Processing the request takes a little time to complete. Once done, SharePoint returns to the Active Sites list. To check that everything works as expected, you can select the site, open the properties pane, and click on the site URL. If the site is connected to an Office 365 group, you can also run the Get-UnifiedGroup cmdlet to check that the URLs are adjusted as expected.
It’s important to understand that renaming a group-connected site does not affect any of the other group properties such as its display name, alias, or email address. If you want to change these properties, do this by running the Set-UnifiedGroup cmdlet.
Effect on Sharing Links
Sharing links are sent by site members to share documents with other people. The sharing links contain a reference to the site. Testing reveals it takes SharePoint a couple of minutes to create a redirection site in its namespace (you see a Server 500 error during this time). Once the redirect is in place, old sharing links work and bring users to the newly renamed site. OneDrive synchronization also continues to work after site renames.
Renaming a Site with PowerShell
The latest version of the PowerShell module for SharePoint Online includes the Start-SPOSiteRename cmdlet. Here’s an example of renaming a site with PowerShell:[crayon-5d5c6bbd31227965274714/]
Office 365 Audit Records for Site Renames
When you rename a site, SharePoint captures details of the action in an ”
SiteRenameScheduled audit record. After a short period, the audit record is ingested into the Office 365 audit log and is available for review (Figure 3).
The Search-UnifiedAuditLog cmdlet can also be used to find these records:[crayon-5d5c6bbd3122e432092298/]
The information about the site being renamed and its new name are found in the AuditData property of the audit records. This property is in JSON format and must be unpacked to extract the information. You can learn how in Chapter 21 of the Office 365 for IT Pros eBook.
We cover SharePoint Online in Chapter 8 of the Office 365 for IT Pros eBook. We also cover a lot of PowerShell for Office 365 Groups and Teams in Chapter 14!