One of my clients recently asked me to change the SharePoint site URL. In this tutorial, I will show you how to change a SharePoint site address or URL using PnP PowerShell.
If you are new to PnP PowerShell and If you haven’t installed it yet, you can do so using the command.
Install-Module -Name PnP.PowerShellChange SharePoint site URL using PnP PowerShell
In PnP PowerShell, we can use the Rename-PnPTenantSite cmdlet is used to start the rename process. Here is the complete script:
Connect-PnPOnline -Url https://szg52-adnub.sharepoint.com -Interactive
# Define variables
$OldSiteUrl = "https://szg52.sharepoint.com/sites/PowerShellFAQs"
$NewSiteUrl = "https://szg52.sharepoint.com/sites/PowerShellFAQsNew"
# Start the rename process
Rename-PnPTenantSite -Identity $OldSiteUrl -NewSiteUrl $NewSiteUrlHere:
- $OldSiteUrl: The current URL of the site you want to rename.
- $NewSiteUrl: The new URL you want to assign to the site.
Once you execute the above script, you can see the output in the screenshot below:

The rename process can take some time, depending on the size of the site and the content within it. You can check the status of the rename operation using the following command:
Get-PnPTenantSite -Url $NewSiteUrlThis will return the details of the site, including its current URL and status.
Conclusion
In this tutorial, I have explained how to change the SharePoint site URL or address using PnP PowerShell. With an example, I have explained how it works with the complete script.
You may like the following tutorials:
- How to Get SharePoint Site Creation Date using PnP PowerShell?
- Get All SharePoint Online Sites using PnP PowerShell
- How to Enable Custom Script in SharePoint Online Using PnP PowerShell?
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.