Renamesite: Stsadm operation (Windows SharePoint Services)
Applies To: Windows SharePoint Services 3.0
Topic Last Modified: 2007-12-04
Description
Changes a URL of a host-named site collection to a new URL. The following conditions apply to the renamesite operation:
The site collection remains in the same Web application and content database after the change.
Make sure that the new URL is reachable in the Web application. This includes the protocol scheme, the host name, and the port number.
The new host-named site collection URL must not already be used as an alternate access mappings. For more information, see Plan alternate access mappings (Windows SharePoint Services).
The renamesite operation only works with host-named site collections, not with path-based site collections. Therefore, you cannot use this operation to perform such tasks as converting a host-named site collection to a path-based site collection or converting a path-based site collection to a host-named site collection.
For more information on host-named sites and path-named sites, see the Remarks section.
Syntax
stsadm -o renamesite
** -oldurl <oldUrl>**
** -newurl <newUrl>**
Parameters
Parameter name | Value | Required? | Description |
---|---|---|---|
oldUrl |
A valid URL, such as "http://server_name" |
Yes |
URL of the site collection that you want to rename. |
newUrl |
A valid URL, such as "http://server_name" |
Yes |
URL of the new site collection. |
Remarks
Host-named site collections are popular among individuals or businesses that host a site. These sites are created using the hostheaderwebapplicationurl parameter of the createsite operation. For more information, see Command-Line Operations (https://go.microsoft.com/fwlink/?LinkId=102963&clcid=0x409).
You can create many root-level host-named sites within a single Web application. Host-named site collections give you more control over URLs. However, there are the following trade-offs:
Host-named sites are only available through the default zone. Users who are configured to authenticate through alternate zones cannot access host-named sites.
The alternate access mappings feature does not work with host-named sites.
Path-based sites are the traditional sites that you create using Central Administration. If you choose to use path-based sites, you are limited to a single root-level site collection within a Web application. However, you can use managed paths to create top-level sites beneath the initial root-level site collection. The primary advantage to using path-based sites is that these sites can be accessed from any zone that you configure. Also, the alternate access mappings feature works with all path-based sites.
Examples
Rename a host-named site collection
In the example to rename a site collection, HostHeader_1 and HostHeader_2 are be the host-named site collection names.
To rename a site collection, use the following syntax:
stsadm -o renamesite -oldUrl http://HostHeader_1 -newUrl http://HostHeader_2