kwizcom banner advertisement

Host Named Site Collections in SharePoint

What is Host Named Site collection?
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
    Host Named Site collections in SharePoint
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.

How to Create Host-Named site collection?
Host-named site collections can be only created by using the Windows PowerShell only. To configure host named site collections, here are the steps:
  1. Create a web application with out Host header (You can create using SharePoint Central Administration or with PowerShell New-SPWebApplication cmd-let)
  2. Create an blank root site collection in the web application (path based).
  3. Create new host named site collections using New-SPSite cmdlet and the -HostHeaderWebApplication parameter.
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>.
To Change URL of the Host Named site collections, use: Stsadm -o RenameSite. E.g.
stsadm -o renamesite -oldurl "http://intranet.crescent.com/" -newurl "http://portal.crescent.com"
Don't forget to update IIS!

IIS Binding: If your web application for HNSC site collections listens to Port 80 without any host headers, then there is no need for creating IIS bindings explicitly! Otherwise, you'll have to add the Host header URLs of Host Named site collections to the web application.
Host Named Site Collections in SharePoint
Its also possible to add site bindings from PowerShell. Here is the script:
Import-Module WebAdministration
New-WebBinding -Name "<Web Site Name in IIS>" -Port 80 -Protocol http -HostHeader "prod.crescent.com"

Here is how to create host named site collection in sharepoint 2013 using PowerShell: PowerShell to Create host named site collections in SharePoint 2013
Host Named Site Collections in SharePoint Host Named Site Collections in SharePoint Reviewed by Salaudeen Rajack on 12:48 PM Rating: 5

1 comment:

  1. IIS bindings are not the way to deal with SP.

    what if you want to add another front-end server in SharePoint Farm?
    what if at any stage you need to stop and re-start SP foundation web app service?

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.