Wednesday, November 24, 2010

Sharepoint naming site collection url

Few days back we got the requirement from one of our clients that he want a new site collection on our sharepoint environment.
We have already provisioned a set of web applications (which are mapped to DNS) and we typically do provision a site collection for different teams depending upon their requirements.

But in this case client wanted that this new site should be identifiable by a unique domain name.
i.e. our existing web application had url http://webapps1.com and typically all site collections have url's of format http://webapps1.com/sites/xyz.
But in this case client wanted the site should be called http://xyz.com

So I did some exploration on achieving this functionality and found following options:
  1. Making a new webapplication on port 80 and host this new site as root site collection. In this way we could facilitate mapping of different domain names to web applications hosted on same server.This method seemed easiest but it had its flaws. It meant that everytime this type of requests comes we will have to create a new webapplication for each small site which inturn could put a lots of overhead (load/supportablity etc) on the server and its performance.
  2. Creating a redirect site in IIS, means creating a dummy site within IIS called http://xyz.com. Map this site in DNS and within IIS redirects this site to actual site http://webapps1.com/sites/xyz. Even this approach had similar issues (server overhead/supportablity etc.).
  3. Then i thought of using Alternate Access Mapping (AAM) which we used within our last application for provisining internal and external site, but then found that AAM works only at web application level.
  4. Then i zeroed upon a concept called Host Named Site Collections. With this approach while creating each of the site collections we can give host header to each of the site collection. Only flaw of this approach is that everytime you need to create a host named site collection then that needs to be done using stsadm command line utility. Ref: http://technet.microsoft.com/en-us/library/cc424952(office.12).aspx
Bingo this is what i was looking for. Microsoft did think through all the possible requirements which might arise before developing any product. Kudos to MS for this.
This also left me with the answer that MOSS platform itself has a lot of capabilities inbuilt and lot still needs to be explored even after working with it for so many years.

No comments: