How to change SharePoint site collection URL or Address (3 Ways)

Want to change SharePoint site URL? In this SharePoint tutorial, we will discuss how to change SharePoint site collection URL or address. We will cover how to change site collection URL in SharePoint 2013 or SharePoint 2016 and SharePoint 2019. I will also show you the easiest way to change SharePoint Online site URL or address in Office 365.

We will cover here:

  • SharePoint 2013 change site URL
  • SharePoint 2016 change site URL
  • SharePoint 2019 change site URL
  • change site URL SharePoint PowerShell
  • How to change SharePoint Online site collection URL
  • Rename SharePoint Site URL and Site Name
  • How to change site collection URL in SharePoint Online using PowerShell

How to change SharePoint site collection URL (On-Premise)

Now, let us see, the 3 different ways to change site collection URL in SharePoint 2013/2016/2019 using PowerShell & STSADM.

A few times you may get the requirement to change the site collection URL in SharePoint 2013/2016 or SharePoint 2019 using PowerShell.

If you are new to PowerShell, you can read an article on Working with PowerShell in SharePoint Online/2016/2013.

There are three different ways we can change the site collection URL in SharePoint 2013/2016.

Change site collection URL in SharePoint 2013/2016 PowerShell

There is a very easy way to change the site collection URL in SharePoint 2013/2016 using PowerShell.

Below is the PowerShell script to change the site collection URL in SharePoint.

Note: You need to do an IISREST after running this PowerShell command.

$site = Get-SPSite http://rajkiran/sites/Oldsite
$site.Rename("http://rajkiran/sites/NewSite")

Change site collection URL in SharePoint 2013 (PowerShell)

This example makes a copy of the http http://rajkiran/sites/Oldsite site collection from its database to the WSS_Content database with the new URL, http://rajkiran/sites/Newsite   and a new Site ID. 

Here we will use the PowerShell script to backup, restore and then remove the old SharePoint 2016/2013 site collection using PowerShell.

You can use remove SP Site command to remove the old site collection

Remove-SPSite -Identity http://rajkiran/sites/Oldsite ' -GradualDelete -Confirm:$False

You can also use backup and restore option to get the same site collection different place.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue  

#Get the Source Site Collection URL  
$sourceURL = Read-Host http://Rajkiran.tets.com/sites/source  
    
#Get the Target Site Collection URL  
$targetURL = Read-Host http://Rajkiran.tets.com/sites/destination  

#Location for the backup file  
$backupPath = Read-Host “Enter the Backup File name & location (E.g. D:\Raj\Source.bak):”  
 
Try  
{  
#Set the Error Action  
$ErrorActionPreference = "Stop"  

Write-Host "Backing up the Source Site Collection..."-ForegroundColor DarkGreen  
Backup-SPSite $sourceURL -Path $backupPath -force  
 Write-Host "Backup Completed!`n"  

#Delete source Site Collection  
Write-Host "Deleting the Source Site Collection..."  
Remove-SPSite -Identity $sourceURL -Confirm:$false  
Write-Host "Source Site Deleted!`n"  

#Restore Site Collection to new URL  
Write-Host "Restoring to Target Site Collection..."  
Restore-SPSite $targetURL -Path $backupPath -Confirm:$false  
Write-Host "Site Restored to Target!`n"  

#Remove backup files  
Remove-Item $backupPath  
}  
catch  
{  
Write-Host "Operation Failed. Find the Error Message below:" -ForegroundColor Red  
Write-Host $_.Exception.Message -ForegroundColor Red  
}  
finally  
{  
#Reset the Error Action to Default  
$ErrorActionPreference = "Continue"  
}     

write-host "Process Completed!"

Rename Site Collection URL using Backup and Restore the Site Collection (STSADM)

We can also rename the site collection URL using backup and restore site collection option using STSADM tool. In SharePoint 2007(MOSS)/2010, you can use STSADM command to rename Site collection URL.

Backup the Source Site collection Using STSADM command:

stsadm -o backup -url http://Rajkiran.tets.com/sites/source -overwrite -filename source.bak

Delete the Source Site collection using STSADM command (It’s mandatory otherwise you will get an error message)

stsadm -o deletesite -url http://Rajkiran.tets.com/sites/source

Restore Site Collection Backup with Targeted URL

stsadm -o restore -url http://Rajkiran.tets.com/sites/destination -filename source.bak

This is how to change the site collection URL using PowerShell in SharePoint 2013/2016/2019.

SharePoint Online – Change Site Collection URL

In this blog, we will discuss how to change site collection URL in SharePoint Online from the SharePoint Online admin center. Also, we will see how to change a SharePoint Online site collection URL using PowerShell.

Change site collection URL in SharePoint Online (Admin Center)

Now, we will see how to change a SharePoint Online site collection URL from the SharePoint Online admin center.

Make sure you have permission to the SharePoint Online admin site.

Step 1: Log in to the SharePoint Online site and go to your Admin center. Make sure you are in the Active Sites section.

change site collection URL in SharePoint Online
SharePoint Online – Change Site Collection URL

Step 2: Next click on the site name and go to the General -> URL section and click on Edit.

change SharePoint Online site collection URL
Change SharePoint Online site URL

Step 3: Next change the SharePoint site URL in the Site address like below:.

change SharePoint Online site collection URL using PowerShell
Change SharePoint Online Site Collection URL

Step 4: Next it will take a maximum of 10 minutes to update the SharePoint Online site and till that time it will show you updating.

how to change SharePoint Online site collection URL
change sharepoint site url office 365 PowerShell

Step 5: Next check the URL, it will show you the new site URL.

Change SharePoint Online site addresses using PowerShell
change sharepoint online site collection url

This is how we can change the SharePoint Online site URL from the browser from the SharePoint Online admin center.

Rename SharePoint Online Site URL Address

Now, let us see, how to change a SharePoint Online site URL and Site Name.

Here, we will see how to change or rename the SharePoint Site URL address. To achieve this, follow the below steps.

Step-1:

Login to Microsoft Office 365 using your SharePoint credentials -> Select Office365 App Launcher and then click on the Admin.

Rename the sharepoint site url
Rename the SharePoint site URL

Step-2:

Select Show all options and then you can able to see the SharePoint option under Admin centers. Select the option SharePoint.

Rename the sharepoint site url address
Rename the SharePoint site URL address

Step-3:

Under Sites, option -> click on the Active sites to view all the active sites.

how to Rename the sharepoint site url
how to Rename the SharePoint site URL

Step-4:

Select the site for which you want to change the URL, click on the i circle icon.

how to Rename the sharepoint site url address
how to Rename the SharePoint site URL address

Step-5:

Under the General Tab, Click on the Edit option and enter your new URL address. Click on the Save button.

Rename the sharepoint site url example
Rename the SharePoint site URL example

Whenever you will click on the Save button, a pop-up box will appear where it will ask you whether you want to rename the site name or not. If you want to rename it then select the Yes button, else select No.

Rename the share point site url example
Rename the SharePoint site URL example

Step-6:

After a few minutes, you can notice the Updated site URL.

how to Rename the sharepoint site url example
how to Rename the SharePoint site URL example

These are the steps to rename the SharePoint Online site URL.

Rename SharePoint Site Name

Now, let us see, how to change the SharePoint Online Site name. We can change the site name of both the SharePoint Team site and as well as the SharePoint Communication site.

There are two ways to rename the site name. Such as:

  1. Rename the SharePoint Site by using the Office 365 Admin Center
  2. Rename the SharePoint Site by using the SharePoint Site Information

Reame SharePoint Site by using Office 365 Admin Center

  1. Select Office365 App Launcher and then click on the Admin.
  2. Select Show all options and then you can able to see the SharePoint option under Admin centers. Select the option SharePoint.
  3. Under Sites, option-> click on the Active sites to view all the active sites.
  4. Select the site for which you want to change the URL, click on the i circle icon.
how to Rename the share point site name example
how to Rename the share point site name example

5. Under the General Tab, Click on the Edit option and enter your new Site Name. Click on the Save button.

how to Rename the sharepoint site name example
how to Rename the SharePoint site name example

6. After a few minutes, you can notice the Updated site Name.

how to Rename the sharepoint site name address example
how to Rename the SharePoint site name address example

This is how we can rename the SharePoint Site by using the Office 365 Admin Center.

Rename SharePoint Site by using SharePoint Site Information

This is another way to rename the SharePoint site name by using the site information.

  1. Select the SharePoint site for which you want to rename the site name.
  2. Select the Settings Gear Icon and click on the Site Information.
Rename sharepoint site name
Rename SharePoint site name

3. Under Site name, change or Rename the new site name and click on the Save button.

Rename sharepoint site name example
Rename SharePoint site name example

4. After a few minutes, you can notice the Updated site Name.

These are the ways that we can rename the SharePoint Site by using the SharePoint Site Information.

Change SharePoint Online site addresses using PowerShell

Now, we will see how to change SharePoint Online site addresses using PowerShell. Here we will see the SharePoint Online Management Shell.

Run the following command to verify that the site address can be changed:

Start-SPOSiteRename -Identity <SiteURL> -NewSiteUrl <NewSiteURl> -ValidationOnly

Run the following command to change the site address:

Start-SPOSiteRename -Identity <SiteURL> -NewSiteUrl <NewSiteURl>

This is how we can change SharePoint online site collection URL from the SharePoint admin center as well as by using PowerShell.

You may like the following SharePoint tutorials:

Conclusion

In this SharePoint tutorial, we learned how to change SharePoint site collection URL or Address. It covers:

  • sharepoint 2013 change site url
  • sharepoint 2013 change site collection url
  • sharepoint 2016 change site url
  • change site url sharepoint powershell
  • change sharepoint online site url
  • change sharepoint online site url powershell
  • change sharepoint online web site address
  • >