Click here to Skip to main content
13,144,679 members (34,354 online)
Click here to Skip to main content
Add your own
alternative version


2 bookmarked
Posted 30 Nov 2012

Change Site Collection URL in SharePoint 2010

, 30 Nov 2012
Rate this:
Please Sign up or sign in to vote.
How to change the name of a SharePoint site in URL


If you want to change the site name (i.e. http://myserver/sites/SiteName/) in the site collection URL, you can't use Site Setting or Central Administration. Unfortunately, the only way is backup the site, delete it and restore in a new site with the right name.


In Sharepoint 2007, you can use the stsadm command to do this, but in SharePoint 2010 you can't do this. You have to use Windows PowerShell for SharePoint.

Using the Code

First of all, open SharePoint 2010 Management Shell, you can find it under Microsoft SharePoint 2010 Products in the Start menu.

The first step is backup the current site:

// Backup-SPSite http://myserver/sites/OldSiteName/ -Path C:\MySite.bak

After that, delete the site using the following code:

// Remove-SPSite –Identity http://myserver/sites/OldsiteName/

NOTE: This step is necessary only if you want to restore the buckup in the same server of the old site. You have to do this because after the restore, a lot of items (i.e. lists) use the same IDs of the original site.

Now you can restore the site in a collection with the right name:

// Restore-SPSite http://myserver/sites/NewSiteName/ -Path C:\MySite.bak


  • 30th November, 2012 - Initial release


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Italy Italy
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Group type: Organisation (No members)

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170915.1 | Last Updated 30 Nov 2012
Article Copyright 2012 by TexaWeb
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid