I had an interesting question from a client today.
They wanted to be able to hang multiple site collections off of their root url (let's just use http:\\litwareinc.com\) for this discussion.
Or to put this another way, they did NOT want to use the Sites default Managed path for additional site collections (i.e. http:\\litwareinc.com\sites\HR, http:\\litwareinc.com\sites\Sales, etc.).
Here's the deal...
You can manage these paths from Central Administration > Application Management > Define Managed Paths .
You can either have a Single site collection OR Many site collections hanging off of an URL path, NOT BOTH.
SO the default mechanism used by SharePoint is, upon Web Application creation, to let you place 1 site collection at the root of the URL (i.e. http:\\litwareinc.com\default.aspx) and to give you the \sites\ path as a wildcard to place additional site collections.
BUT if we replace this root path entry with a wildcard entry instead we can have many off of this (i.e. http:\\litwareinc.com\site1\default.aspx , http:\\litwareinc.com\site2\default.aspx, etc.).
However, doing this creates a problem: If we already had a site collection at the root url (i.e. http:\\litwareinc.com\) it will no longer be accessible... In fact Now you have a situation in which you have a dead root URL (i.e. no site collections at the root).
Managed Paths are an either or choice: Either you have an explicit inclusion for the path in which case you may have exactly one site collection at the given path, OR you have a wildcard inclusion in which case you may have as many site collections hanging off of this path (as sub directories) but there will be nothing at the root of this path.
So if you are OK with NOT having any site at the exact URL but want many sites off of it instead you may REMOVE AND REPLACE the explicit inclusion in the Managed Paths with a wildcard inclusion.
Here's How:
When you create a new web application it AUTOMATICALLY adds an explicit inclusion for the / (root) path and a wildcard inclusion for the /sites path off of the root.
WARNING: If you already have a site collection sitting at the root as an explicit inclusion YOU WILL NO LONGER BE ABLE TO ACCESS IT! after doing this.
-
If instead of creating a site collection at the root path we go into Central Administration > Application Management > Managed Paths
-
Using the Web Application drop down pick the Web Application you want to affect.
-
select the (root) explicit inclusion and click on the Delete selected paths link
-
Add a new WILDCARD inclusion for the (root) (you use a / for this) and click OK
-
Now you can use Central Administration > Application Management > Create Site Collection to create multiple sites off of the root url.
WARNING: If you already have a site collection sitting at the root as an explicit inclusion YOU WILL NO LONGER BE ABLE TO ACCESS IT!.
A Better Alternative...
A better way to possibly deal with this scenario is to use explicit inclusions for each and every Site Collection:
i.e. you will have one (root) Site Collection (your main portal) and then departments hanging off of it: (e.g. explicit inclusions added for HR, Sales, Marketing, etc.) and then create a single site collection in each of these locations).
To accomplish this:
- Remove the sites managed path (be sure you do NOT have any sites off of this path as this WILL disable access to them!)
- Now add Explicit Inclusions for each Site Collection you would like to add and then create your site collections at these Paths (one per Path)
It's just that simple and easy. Now you have your Portal at http://litwareinc.com/ and each site is at an url off of this (e.g.http://litwareinc.com/hr/)