Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's SharePoint Admin Blog > Posts > Renamesite doesn’t do what you think it does
November 29
Renamesite doesn’t do what you think it does

Along with mergecontentdbs another operation has been recently added to STSADM, renamesite. KB939535 gives some guidance on how to use this new operation. At first glance, I assumed it worked like renameweb, which was nice as there is no way to rename site collections without locking them, backing them up, deleting them and restoring them with the new name. After I read the KB I was disappointed. It seems that renamesite does not work with path-based site collections. A path-based site collection is in the form of http://server/sites/sitename. 99% of the installations I see are in the form. Instead, renamesite only works with host-based site collections. Host-based site collections are site collections that are created using host header mode. Host header mode allows multiple site collections in the same web application, but all have top level names like http://host1 and http://host2. If you're using host header mode, you can use renamesite to rename them. If you're using path-based site collections like most of the SharePoint using world, then this operation is useless to you.

tk

Comments

yeah.

Dammit this sucks.
 on 3/12/2008 5:32 PM

Confused

So a Path-Based site would have the physical server name in the URL and a Host-Named site would have the DNS (or Web App) name in the URL?
 on 5/27/2008 12:42 PM

Re: Confused

Sounds like you have it.  Path-based sites are what you're probably used to and look like this:
http://server/
http://server/sites/IT
http://server/sites/EMEA
etc.  The 'renamesite' operation does NOT work on these, unfortunately.  Host named based sites all look like this:
http://server
http://www.example.com
http://sharepoint.yourmomma.org

Now, you can do this with path based sites by creating three different web applications.  With host based sites you can do all this with one web app and therefore one application pool.  This makes sense for people like hosters that have hundreds of sites.

tk
Todd O. KlindtNo presence information on 5/27/2008 9:10 PM

Still confused

Our site (which we are trying to rename) is connected to by entering http://sharepoint.organization.com so it is a Host-Named site, correct?

We tried to run the rename site command on our site and recieved a message that the rename site command would only work on Host-Named sites so this indicated we have a Path-Based site?

How can I tell what type our site is since it appears to be one type but the command is telling us it is another?

Thanks
 on 6/2/2008 10:40 PM

Recommendations

So what would you recommend as the best way to rename a site - actually, all I need to do is change the URL?
 on 9/3/2008 6:23 AM

Re: Recommendations

If we're referring to Site Collections (not webs) I don't know of a way to rename them.  The only way I have been able to do it is to back it up with STSADM, delete it, then restore it to the new location.  That's a pretty scary operation though.

tk
Todd KlindtNo presence information on 9/3/2008 10:01 PM

Help. I need to change the URL.

does anyone know how to change the URL of a site without having to recreate everything?

Thanks,
C
 on 6/2/2009 9:28 AM

Re: Help. I need to change the URL.

Just like the response above your comment. There is no way to rename a site collection short of backing it up and restoring it to the new location.

tk
Todd O. KlindtNo presence information on 6/2/2009 1:31 PM

No Way

Microsoft has tied our hands here on doing a safer approach. if we can backup and create the new site collection using the backup with the new name and then once the new site is fine then we can delete the old site. But there will be GUID conflicts which will not allow to restore the same site backup in the same content Database.

There is no way out of it. you have to backup,Delete and Restore. Pray god before deleting so that the restore be successfull.
 on 2/24/2011 9:15 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 SPDocKit-150x180