Host Named Site Collection in SharePoint

Access departmental site with their respective host address without creating a separate web application or avoid accessing it with lengthy URL.

When we develop SharePoint Portal, we will create a single web application with different site collections for each department / section, but each department / section may not like to access their portal site with lengthy URL or common name instead they wanted to have like deptname.domain.com.

There are two ways to achieve this without creating a separate web application for each department / section.

  1. Going with URL rewrite option at IIS level. With this approach, department can key in the url as deptname.domain.com, but when the page is loaded there would be actual url displayed that is portal.domain.com/sites/deptname.

  2. Host Named Site collection

    You can keep your business users happy by having their respective short URL to access their sites without enabling them to access with common lengthy URL.

    But Host Named site collection can only be created through PowerShell. When you create, you have to mention to which web application should this site collection be added to.

New-SPSite http://NewSiteCollection.domain.com –OwnerAlias “domain\username” –HostHeaderWebApplication http://portal.domain.com –Name “Site Collection Title” -Template “STS#0”

Here,

NewSiteCollection.domain.com is nothing but the host address for a new site collection for example, http://finance.domain.com, portal.domain.com is the actual host address for web/root site.

Note: DNS entry for each host address is mandatory.