How to Rename the Site Address (URL) for a SharePoint Online Site

Site Rename Addresses a Long-Overdue Customer Request

Refreshed on 14 November to reflect new UI in SharePoint Admin Center.

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 the address (URL) and display name for a site. You still can’t change the tenant’s domain name (the 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:

Get-UnifiedGroup -Identity "Marketing Gurus" | Format-List SharePoint*

SharePointSiteUrl      :
SharePointDocumentsUrl : Documents
SharePointNotebookUrl  :

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 is Office 365 roadmap item 56205. It first appeared as a preview feature in May 2019. Office 365 notification MC193275 on 16 October revealed that the feature rolled out to customers in mid-October 2019.

Renaming a Site

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. If you see the banner in Figure 1, it means that the selected site comes within the scope of an Office 365 retention policy or eDiscovery hold. You can’t change the site URL if these conditions exist. If you decide that you really need to change the URL, you’ll have to remove the site from the policy or hold.

Can't rename a SharePoint site URL because of a retention policy
Figure 1: Can’t rename a SharePoint site URL because of a retention policy

Click the Edit link under the URL 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. SharePoint also asks if you want to rename the site (to keep it aligned with the new site URLs). You don’t have to do this, but it is a good idea.

Entering a new address for the site
Figure 2: Entering a new address for the site

After saving the new site address, you’ll be asked if you want to update the display name for the site too. Although this isn’t mandatory, it’s wise to have the display name match the new site address.

Processing the request to update the site address takes a little time to complete and the site is locked during this period. 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.

Sharing Links are Upgraded

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.

See this page to learn how to query the redirects known to SharePoint and remove them if necessary.

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:

# Rename a SharePoint Site
Start-SPOSiteRename -Identity -NewSiteUrl

Are you sure you want to perform this action?
This operation will change the URL for site to Do you want to continue? Y/N
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

CurrentSiteUrl :
NewSiteUrl     :
NewSiteTitle   :
RenameID       : bad6b1ae-8995-77ae-9d01-2cac19bfb7bd
State          : InProgress
TriggeredBy    :

Office 365 Audit Records for Site Renames

When you rename a site, SharePoint captures details of the action in a 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).

Office 365 Audit record for a site rename operation
Figure 3: Office 365 Audit record for a site rename operation

The Search-UnifiedAuditLog cmdlet can also be used to find these records:

# Look for SharePoint Site Rename Records
Search-UnifiedAuditLog -Operations SiteRenameScheduled -StartDate 1-May-2019 -EndDate 10-May-2019 | Format-Table Creationdate, Operations, Userids

CreationDate        Operations          UserIds
 ------------        ----------          -------
 8 May 2019 18:08:42 SiteRenameScheduled
 3 May 2019 11:05:04 SiteRenameScheduled
 2 May 2019 12:33:40 SiteRenameScheduled
 2 May 2019 12:24:58 SiteRenameScheduled
 1 May 2019 13:53:57 SiteRenameScheduled

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.

Understand the Side Effects

Before rushing to rename a site, make sure that you read and understand the side effects of the action documented by Microsoft. Some of these, like losing items in the site recycle bin, are quite destructive.

Update: January 2, 2020: Renaming a site used to have an effect on the connection between Teams (via the Files channel tab) and SharePoint. Microsoft has fixed the problem and you shouldn’t have any problems with Teams now.

One side effect that isn’t documented is that if you have explicitly included or excluded a site in an Office 365 retention policy or eDiscovery hold, you should remove the site reference from the policy or hold before you update the URL. The reason is that the URLs of included or excluded sites are stored in the properties of the policy or hold. If you rename the site, the properties of the policy or hold are not changed to reflect the new URL, which then causes errors when Office 365 tries to apply the policy or hold against the old URL.

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!

54 Replies to “How to Rename the Site Address (URL) for a SharePoint Online Site”

    1. I don’t see anything in the roadmap. Sorry – maybe someone else knows.

  1. I wish there was an announcement from MS on this. So far it hasn’t hit my dev or prod tenants.

    1. It takes time to deploy changes to all tenants. Are you configured for targeted release?

  2. hi, I try to do with the last module of Sharepoint Online (ver:16.0.8812.1200) and show the next error:

    Start-SPOSiteRename : Error Code: -5,This site address can’t be changed.
    No se admite. (It is not allowed)
    At line:1 char:1
    + Start-SPOSiteRename -Identity $url -NewSiteUrl $NewSiteUrl
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Start-SPOSiteRename], Exception
    + FullyQualifiedErrorId : Error Code: -5,This site address can’t be changed.
    No se admite.

    Can you help me please?

    1. Two components are needed for a site rename to work: the front end (Admin Center or PowerShell) and the back-end (the processing needed to effect the change). A simple test is that if you don’t see the rename feature in the Admin Center, your tenant doesn’t have the back-end set up to support site renames, which is what you’d expect because the feature is in preview. You’ll just have to wait until Microsoft rolls-out the code to your tenant.

  3. This is a great feature. I am on targeted release. But, still do not see it yet. May be it will take sometime to reflect.

    1. I imagine we will hear more about availability at the SharePoint Conference next week.

  4. I’m bit worried about its impact in places where site collection url is static (like search webparts). Does this change mean one would have to update the urls at places where its using the old one ? Also is there any events which can be tapped to if a site collection is renamed ?

    1. As explained in the article, there is an audit event that can be looked for to check for site rename events. As to static references, I think we’ll find out over time. It’s the nature of these kind of things that not every scenario is catered for initially as some are unknown when the design is done.

  5. Hi, I am getting the error as below. How did you managed to rename? It seems like it is not supported yet.
    Start-SPOSiteRename : Error Code: -5,This site address can’t be changed.
    It’s not supported.
    At line:1 char:1
    + Start-SPOSiteRename -Identity
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Start-SPOSiteRename], Exception
    + FullyQualifiedErrorId : Error Code: -5,This site address can’t be changed.
    It’s not supported.

    1. Wait for the code to be released and generally available.

  6. Thanks.
    Waiting for this feature!
    Could you please check if the original URL what has been changed to another URL is available right after URL change?

    1. There’s a redirect from the old URL to the new URL.

      1. Thanks for your reply. So i cannot create new sites with the previous URL?

        We need to bring our classic intranet to modern sites (PS is not supported with our old template), so i build everything on modern and then i delete the old sites to free the URL.
        With this new feature i thought i just could rename the old URL to free the URL-Name. That would make the migration process a lot easier..

  7. Any new information about this future? Our tenant still do not have an edit url button in sharepoint admin center.

    1. The feature was announced and discussed at the recent SharePoint Conference, so it’s coming. Just be patient.

  8. Regarding the redirect of URL for sharing links. What happens if a new site is created, and it’s the name of the site previously that has been renamed.
    Will the redirect cause issues due to the same name / URL ?

    1. I don’t believe you can create a site when the URL conflicts with a redirect. To get around the problem, SPO adds a character to make the site URLs unique.

  9. Hi Tony, thanks for an excellent post. Do you happen to know if this will be available for Project Online Site Collections? There is a potential major benefit to this feature that I cannot find any discussions about at the time.

    Today, Microsoft can only restore on site collection level and they do not offer “out of place” restore; for example restoring site collection “Important_Copy” while “Important” is still available in the tenant. Their SLA is restores within 48 hours of a request, based on backups taken every 12 hours and retained for 14 days.
    The major limitation is of course if an org only needs to retrieve item(s) or Project(s). For example files deleted from the 2nd stage recycle bin due to malicious activity, or a Project hosted on PWA as no recycle bin or version history is available for Project Online (!). As a result, a restore comes with the price of having multiple days of work being overridden by an old copy of a site collection. One major argument to why orgs are paying premium amounts for 3rd party tools to cover for these scenarios.

    I was just on the phone with MSFT support. They indicated that it sounds technically possible to archive and an out of place restore if a customer can change the URL of original site collection before they go ahead with a restore. However, they could not confirm this as the feature is still in a state of being rolled out.

    Item-level restore is less of risk on SharePoint thanks to the recycle bin or other file retention features, but it is a significant risk in Project Online.

    1. I believe this will be for modern site collections (connected to Office 365 Groups). Microsoft’s support stance on restoring SharePoint backups depends on the people you speak with. I like to see something in writing before I believe anything.

  10. This works well, but I’m wondering if there’s a way to defeat the redirect. I need to recover the “old” URL for another use. In this case the site creator made a mistake when creating and we need the old URL for another site. I don’t see anything in the Set-SPOSite cmdlet to address this. Any ideas?

  11. Is this cmdlet working ?
    I keep getting the following error
    Start-SPOSiteRename : Error Code: -5,This site address can’t be changed.
    It’s not supported.

    Using – PSVersion 5.1.17763.592

    1. The underlying code necessary for the cmdlet to work might not yet be provisioned to your tenant. Patience!

  12. I couldn’t change my site URL too. But the error message i received is different. it says
    “Error code: -135, this site address can’t be changed.
    This site template is not supported for rename.”

  13. Available for our Tenant.
    Cannot rename if the site is on Retention hold.

    Renaming the site / URL does not rename the O365 group or email, this has to be done separately.

    We tested renaming a site to decommissioned XXXXX, then renamed the O365 group alias / email etc.

    Tried then to create a new O365 site the same name as the previous site before change the URL, and it would complain the alias is in use, although it isn’t.
    Deleted the O365 group.

    Could then create a new SPO site, but what it doesn’t warn you is the name \ url \ alias has a number appended to it.

    Seems if you rename a site, it holds onto the previous name to do the redirection, but from what I can tell you can’t query on what alias are being redirected.

    Imagine years down the track and if you done a fair few site url changes, trying to figure out what name is being re-directed / held….

    1. I’ll test the retention hold issue because I haven’t met this before. This is a SharePoint only feature so it’s unsurprising and known that it has no effect on the Office 365 Group or email address. SharePoint has to hold some information about the old site URLs to allow it to redirect to the new URL. I’m not absolutely sure how long this redirect lasts but I imagine it lasts quite a long time if not indefinitely because that tends to be the need for large enterprises.

      1. Ok, so unless I missed something, I have not worked out how to delete a re-directed site.
        If it wasn’t deleted when the site it was directed is deleted, as in my case.

        I current have a re-directed site URL in use but the site it is suppose to be redirecting to is now hard deleted.

        Will update this when I work out how to, have also got a incident with Microsoft top see what they say.

  14. I renamed a SharePoint Online site name and renamed its Office 365 group. How do I change the “work email” that is stored for the Members group within SharePoint Online? It is still the old O365 group name. Thank you.

    1. Do you mean the primary smtp address for the group? If so, you can change this through the admin center or with PowerShell. For example:

      Set-UnifiedGroup -Identity GroupName -PrimarySmypAddress

  15. Thanks for the quick reply Tony. Sorry for not being clearer. I changed the group’s PrimarySmtpAddress when I changed the site’s name and the group’s name. But in SharePoint Online the old email address persists as the “work email” of the group. One place this is visible is by navigating in the site’s settings: Settings gear icon > Site Permissions > Advanced Permission Settings > (Site name) Members > (Site Name) Members > Work Email. SPO seems to create an internal user object that represents the federated AAD / O365 group, and saves that group’s PrimarySmtpAddress into “Work email”. The value of “Work email” is stale, now that I changed the O365 group’s name and PrimarySmtpAddress. How do I access “Work email” of this SPO user object? Thank you for the help.

    1. I don’t know how this address is used – but I suspect it is an artifact of on-premises SharePoint that was carried over to Office 365 and the address is set when the original group is created and ignored thereafter. Do you ever see the address being used anywhere?

  16. I don’t know yet if the address is used so was hoping to get it corrected if the was ever a use-case where it is used. It definitely seems to be “stamped” from original creation of the O365/AAD group but not kept in sync with the group.

    1. The original URL is kept as a redirect to ensure that any previous references to the site work. You could remove the redirect site if you wanted to (with PowerShell)

      1. Thanks Tony! I have removed the URL using Remove-SPOSite command.

  17. Hi Tony, thanks for sharing. If you rename a site that has a few subsites on it, will the subsite urls be updated as well?

    1. I must admit that I have not done this, mostly because so many site collections today are single-site (the influence of Microsoft 365 groups). I’m pretty sure that the answer is yes (the logical outcome), but I can’t stand over it.

  18. If you create a site with (dot) in the name, Shrepoint will create it, but if you create a site name without the (dot) and try to add it later Sharepoint show an erros saying it is impossible to use (dot) on a site name.

    Is there any workaroud ?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.