Monday 1 May 2017

How to change List and Document Library Web URL in SharePoint

Today I am going to write about “How to change List and Document Library Web URL in SharePoint
”, This is an important task which admin use to do.
Description: we have a requirement to change List or Doc library web URL, if we will try to change from the user interface, it won’t allow us to do the same. We can change List or Library name, it means we can rename the List or Library Name but it won’t effect for Web URL of the same List.
We can change List or Library Web URL using SharePoint Designer and use PowerShell. In case we have don’t have installed SPD in our local system, in that case, we can use PowerShell which will be default Available.
We are going to show how to Change the URL of a SharePoint list or library using PowerShell:
  • Default If we will open any List or Library it will be appended with List or Library name and be ending with aspx which is the extension.
  • We are creating new List and will perform PowerShell script to change Web URL in easy steps.
  • Create New List and you can see the List we URL will be List Name default, refer below screen shot:


  • If we will try to change the Same List URL using User interface, we could not find any option to do the same.
  • So now Open SharePoint Management Shell with Admin rights and update the below script as mentioned:
  •   In case if you are not using PowerShell management shell, then use the first line of code about Add-PSSnapin.
  • Very first Line of the script we will variable to store the Site or Subsite URL, in case if you are using Site Collection, use Get-SPSite instead of Get-SpWeb.
  • Then List name which you want to change the URL, once all done move to next line of code and enter the URL name which you preffer to change next to List/
Add-PSSnapin Microsoft.SharePOint.Powershell
$List = $List = $Web.Lists["Test for URL Changes"]
$List.RootFolder.MoveTo("/sites/ admin/search/Test_team/Lists/test")

Note: Make sure any white space should not take place.


  • Now we are ready with the script, we will execute the same Code to PowerShell, check the List URL.
  • After executing this script we can see the result, List web URL will get change, page view will not change only List Web URL will get change, refer below screen Shot: