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?
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.
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.
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.
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?
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.
Excellent, that fixed our root site collection, but is our new site collection working? Of course not!
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.
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).