Search This Blog

Sunday, November 30, 2014

SharePoint Host Named Site Collections

So to begin with......what is a Host Named Site Collection (HNSC)


Host Named Site Collection (going forward, I will be using HNSC) is the best option if you want to create multiple root-level site collections within a web application. (i.e. unique URL for your site collections. Cool……right? That is what I thought so)

In SharePoint, we have support for both path-based & HNSC.The basic difference is: 

All path-based site collections in a Web application share the same host name (DNS name), whereas each HNSC in a Web application is assigned with a unique DNS name.

In simple words:
HNSC allows you to create as many root-level host-named sites within a single Web application.
http://newsite.customer.com
http://www.testhnsc1.com

With path-based sites, you are limited to a single root-level site collection within a Web application
http://www.fahad.com/sites/site1
http://www.fahad.com/sites/site2

So....yeah...we can have HNSC. But with it come some advantages and disadvantages.

Advantage/Dis-advantages:

Host Named Site Collection (HNSC)

·         We can have fancy URLs for our site collections. We have more control over URLs.


·         Host headers cannot be applied at the Web application (IIS site) level, and doing so makes it impossible to access HNSC.


·         HNSC have a single (unique) URL. So they do not support alternate access mappings and are always considered to be in the Default zone.


·         Most importantly Alternate Access Mappings don’t work with HNSC. You can't use both HTTP and HTTPS together.


·         It can scale to thousands of site collections because they can all exist within a single Web application and still offer vanity naming capability.


·         This helps in hosting multiple tenants on the same farm(multi tenancy)

Path-Named

·         All 5 zones are available for Path based sites. 

    
     ·         Alternate Access Mappings is very much supported (supports SSL)

   
     ·         User is limited to a single root-level site collection within a Web application

Powershell script for creating a HNSC 

Well, before executing the below powershell script, we would have to create a web application without Host header.

New-SPSite http://www.testhnsc1.com -OwnerAlias Domain\username -HostHeaderWebApplication <Web-App-URL>

Sharepoint Multi Tenancy and Host Name Site Collection

     Multi-tenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client organizations (tenants). Multi-tenancy is contrasted with a multi-instance architecture where separate software instances (or hardware systems) are set up for different client organizations. With a multi-tenant architecture, a software application is designed to virtually partition its data and configuration, and each client organization works with a customized virtual application instance. Multi-tenancy is also regarded as one of the essential attributes of cloud computing.

The term multi-tenancy in SharePoint comes up if we are planning to host Sharepoint for different clients. Creating a large number for web applications causes resource problems. In such a scenario the best approach for companies hosting Sharepoint would be to opt for Host Named Site Collection (HNSC). I have already posted in detail on Host Named Site Collection (HNSC).

Hosting a Sharepoint environment for multiple tenants was a challenge before HNSC.This was because on the limitations on the number of web applications, managing site collections, data isolation problems and URL name space issues.
With HNSC it is now possible to have "vanity URLs" for site collections. For example ,we could havewww.fahad.com for one site collection and www.sharepoint.com on another - all in the same Web application.

But at the same time there are few things we need to be aware of. HNSC do not support alternate access mappings and are therefore always considered to be in the default zone. Moreover, host headers cannot be applied at the Web application (IIS site) level, and doing so makes it impossible to access host-named site collections (IIS tends to ignore requests that does not match host binding).
This creates a HNSC with the URL http://www.testhnsc1.com  in the SharePoint 2010 Web Application with the URL <Web-App-URL>


1 comment:

  1. Plan and implement host-named site collections in SharePoint 2013 and learn how path-based site collections might affect your environment. https://www.cloudappsportal.com/

    ReplyDelete