How to: Create a Site Collection at the root level of your Web Application

Posted Tuesday, September 22, 2009 3:02 PM by CoreyRoth

Have you ever wanted to create a site collection off the root of your site at a path such as (/MySiteCollection), only to find a screen that looks like this?

SiteCollectionDefaultManagedPaths

This really stinks.  After all, I don’t want my site new site collection to be under /personal or /sites. I want it to be under the root (/). The link to the left points us to the managed paths page, but you need to know what you are doing.  Going to the managed paths page, we see something like this.

DefaultManagedPaths

As you can see we have four entries listed, but only two are setup as Wildcard inclusions.  Looking at the dropdownlist from the first screenshot, we can quickly put two and two together and realize that it has to be a wildcard inclusion to show up in the list.  So at this point, it seems we need to change the (root) inclusion to be a wildcard.  However, there is no edit button, so this leaves us with no choice but to delete it.  We can then add the root as a wildcard inclusion as shown below.

ManagedPathsNewRootWildcardInclusion

After adding the managed path, we can now go back to the Create Site Collection page and we see that the root path is now available.

SiteCollectionRootManagedPath

Excellent, we can now create our new site collection with the path off of the root that we wanted.  Complete the rest of the information on the page, and we now have a working site collection.  We test the new url http://moss-server/MySiteCollection and things work great.  Now, I want to go back and check something on the root site collection.  Wait, what’s this?

RootSiteCollection404

404 Not Found.  That’s a bad time.  Remember those changes to our managed paths?  SharePoint won’t serve up the root site collection with it set as wildcard inclusion, but it will server up anything underneath it.  This means we have to go back to our managed paths and delete the wildcard inclusion off of the root and change it back to an explicit inclusion.

ManagedPathsNewRootExplicitInclusion

Excellent, that fixed our root site collection, but is our new site collection working?  Of course not!

NewSiteCollection404

Now what do we do?  Well when you think about it, it does make sense.  We need a managed path defined for our new site collection since we deleted the wildcard.  Go create a managed path for the new site collection with an explicit inclusion.  Here is what the complete site collection lists looks like when we are done.

ManagedPathsComplete

If we test both the root and new site collection, we will find that they both now work.  It’s kind of a pain isn’t it?  Hopefully, these detailed steps will help you the next time you need to create a site collection off of the root site (or anywhere else for that matter).

Filed under:

Comments

# Twitter Trackbacks for How to: Create a Site Collection at the root level of your Web Application - Corey Roth - DotNetMafia.com - [dotnetmafia.com] on Topsy.com

Pingback from  Twitter Trackbacks for                 How to: Create a Site Collection at the root level of your Web Application - Corey Roth - DotNetMafia.com -         [dotnetmafia.com]        on Topsy.com

# re: How to: Create a Site Collection at the root level of your Web Application

Thursday, June 3, 2010 1:46 AM by David Bojsen

Realle saved me there - thanks a bunch

# Root Level Site Collections « SharePoint From Scratch

Monday, October 11, 2010 10:46 AM by Root Level Site Collections « SharePoint From Scratch

Pingback from  Root Level Site Collections «  SharePoint From Scratch

# re: How to: Create a Site Collection at the root level of your Web Application

Friday, March 18, 2011 10:54 AM by Steve Combs

Would it be feasible to set the root with a wildcard inclusion, create a http://moss-server/RootContent site collection, then use something like UrlRewrite or a 404 handler/redirector to serve the "root" content?  What would be the best implementation to maintain full function and performance?

# re: How to: Create a Site Collection at the root level of your Web Application

Tuesday, March 22, 2011 11:27 PM by CoreyRoth

@Steve I think I have tried an approach like that before, but I ran into issues.  It's been a while so I can't remember the details though.

# re: How to: Create a Site Collection at the root level of your Web Application

Monday, February 13, 2012 6:37 PM by Jason

Hey Guys. I was following this guide but didn't realize I had Central Admin selected and deleted the root path. Now I can't get into the Central Admin site.

Any suggestions? Ran a stsadm -o repairdatabase but it doesn't help.

This system isn't currently in production but was expected to be live in a few days o.O

Any help is appreciated!

# re: How to: Create a Site Collection at the root level of your Web Application

Thursday, February 16, 2012 10:32 PM by CoreyRoth

@Jason Yikes.  You can fix it by running the Configuration Wizard and removing central admin.   Then run the wizard again and readd it.  If you have a backup of your content database, that will work too.

# re: How to: Create a Site Collection at the root level of your Web Application

Sunday, December 30, 2012 12:23 AM by Jenny Council

Could you explain the problem you are trying to solve... (apologies in advance if this is a dumb question - I just installed SP2010 for the first time this weekend)...

In Managed Paths I just created an explicit path for a URL I want (eg doclibrary, for a URL of mydomain.local/doclibrary).

Doesn't that resolve it the problem rather than the delete/recreate process you have above?

Also, when I went to create a new site off my root site, it asked for a path - having created /doclibrary first in "managed Paths", that site creation attempt failed.  So I tried again with a clean path name /doclib, which successfully created a site with the URL mydomain.local/doclib.  However /doclib does not show up in Central Admin Managed Paths...

I am somewhat confused!  ie, I can get the result I want without your method, but I'm not clear what I did, or why it doesn't register in Managed Paths... Can you explain?

# re: How to: Create a Site Collection at the root level of your Web Application

Sunday, February 3, 2013 3:41 PM by Izzeddeen Alkarajeh

You saved me a lot of headache. Thanks a lit.

But unfortunately, when I fixed the root collection the "My profile" link became broken.

Any idea how to fix it?

# re: How to: Create a Site Collection at the root level of your Web Application

Wednesday, February 6, 2013 9:25 AM by CoreyRoth

@Izzeddeen I'm not sure what would cause that.

# re: How to: Create a Site Collection at the root level of your Web Application

Wednesday, February 6, 2013 9:35 AM by CoreyRoth

@Jenny  You can just create an explicit managed path first.

# re: How to: Create a Site Collection at the root level of your Web Application

Friday, May 3, 2013 1:51 PM by Alshah

Thanks!

# re: How to: Create a Site Collection at the root level of your Web Application

Sunday, June 2, 2013 7:39 AM by Aly Emam

Thanks for All

but for sorry i did all the above mentioned steps but i can not access the web app i have created.

# re: How to: Create a Site Collection at the root level of your Web Application

Monday, September 2, 2013 2:32 AM by Rajat Jindal

Great post helped a lot.

Thanks for explaining such a tricky thing.

# create app catalog site collection powershell

Tuesday, December 16, 2014 11:17 AM by create app catalog site collection powershell

Pingback from  create app catalog site collection powershell

# app catalog site collection

Tuesday, December 30, 2014 6:43 PM by app catalog site collection

Pingback from  app catalog site collection

Leave a Comment

(required)
(required)
(optional)
(required)