I have a SharePoint site collection at following url:
http://<server name>/sites/abc
Due to some reasons I have to change the url to
http://<server name>/sites/def
How can we do this?
Nikhil why did u ask the wrong question in first place? People are spending their valuable time to help others. They test in their environment and spend those valuable time. Please be specific when you ask otherwise next time you will be not able to get answers correctly.
I think this is not supported, as only host part for a host header site collection or the last segment after a wildcard managed path of a site collection Url can be renamed.
In this case, I think you have to backup and restore your site collection, which works as well.
Use Backup-SPSite http://<server name>/abc -path “C:\backup.bak”
Then Restore-SPSite http://<server name>/def -path “C:\backup.bak”
And what if the url is http://<server name>/abc and abc is managed path of type explicit inclusion
You can use:
Set-SPSite -identity http://<server name>/sites/abc -url http://<server name>/sites/def
After some testing, I found that running an IISRESET is needed in order for it to work completely.
Sara’s solution is great for renaming a subsite, however it is not possible to change the site collection URL with this unfortunately.
Easy …. Go to Site Action => Site Setting => Click on “Title, description, and icon” located under “Look and Feel” and change the URL name!