What is Host Named Site collections?
Host-named site collections are the best option if you want to create multiple root-level site collections within a web application. (Or Unique URL for each site collection)
SharePoint supports both path-based & host-named site collections. The primary difference is: All path-based site collections in a Web application share the same host name (DNS name), where as each host-named site collection in a Web application is assigned with a unique DNS name.
In other words:
- Host-named site collections allow you to create many root-level host-named sites within a single Web application.
- With path-based sites, you are limited to a single root-level site collection within a Web application
What are the advantage/disadvantages of Path Based vs Host Named Site Collections:
Path-Named:The major advantage of path-based sites is that these sites can be accessed from any zone that you configure. Also, the alternate access mappings feature, which provides support for SSL, works with all path-based sites. you are limited to a single root-level site collection within a Web application, But the managed paths option allows you to create top-level sites beneath the initial root-level site collection.
Host-Named:They give you more control over URLs. host-named site collections are only available through the default zone.The alternate access mappings feature does not work. You can't use both HTTP and HTTPS together. You can create up to 100,000 host-named site collections within a single IIS Web site. Another great advantage of HNSC is: You can use single wildcard SSL certificate for you entire site collections. E.g. *.Company.com. could be used for sites such as: Sales.Crescent.com or NA.Sales.Crescent.com, etc.
So, How to Create Host-Named site collection?
Well, Create a web application with out Host header(You can create using SharePoint Central Administration or with PowerShell New-SPWebApplication cmd-let) , and execute the PowerShell command, Of course, Host-named site collections can be only created by using the Windows PowerShell only:
New-SPSite http://<URL-For-Site-Collection> -OwnerAlias Domain\username -HostHeaderWebApplication <Web-App-URL>This creates a host-named site collection with the URL <URL-For-Site-Collection> in the SharePoint 2010 Web Application with the URL <Web-App-URL>.
stsadm -o renamesite -oldurl "http://intranet.crescent.com/" -newurl "http://portal.crescent.com"
Don't forget to update IIS!
Add IIS Binding:
Don't forget to add IIS bindings! Otherwise, your host named site collections will not be accessible. Go to IIS, Pick the Web Applications which hosts the Host Named Site collection, Click on Bindings, Add the Host header URLs of Host Named site collections.
Import-Module WebAdministration New-WebBinding -Name "<Web Site Name in IIS>" -Port 80 -Protocol http -HostHeader "prod.crescent.com"
Technet Reference on Host-named site collections: Plan for host-named site collections
You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.