Change a SharePoint site collection top-level site URL

Changing a SharePoint site collection name is easy enough (Site Settings –> “Title, description, and logo”), but changing the URL for a top-level site is a bit more involved than just changing a subsite URL. Note that this post applies to on-premise/server environments only.

  1. Connect to/log in to your SharePoint server
  2. Open SharePoint 2013/2016 Management Shell in administrator mode (right-click, “Run as administrator”
  3. Once the module loads, enter the following three cmdlets (I recommend typing and entering them one line at a time, not copying and pasting):

$site = Get-SPSite

After the IISReset cmdlet is run, it may still take a small while for the new site’s URL to work as expected.


  • If you’re receiving “Get-SPSite : Cannot find an SPSite object with Id or Url: http://…” it could be you’re attempting to change the URL for a subsite, not a site collection top-level site.
  • This renaming method will only work for managed paths (central admin –> manage web applications –> select a web app and “managed paths”) that are of type “wildcard inclusion”. Typically out of the box this only includes “sites”
    wildcard inclusion.png
  • This article first published by Waqas Sarwar does a good job of explaining the pros and cons of alternative methods (such as Copy-SPSite and Backup & Restore), as well as the limitations: SharePoint 2016: Rename Site Collection URL Best Practice


3 Replies to “Change a SharePoint site collection top-level site URL”

Leave a Reply

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