Friday 11 September 2015

Host Named Site Collection

Host-named site collections enable you to assign a unique DNS name to site collections for example http://MysiteA1.sharepoint.com. 

Host-named site collections can be created only through the Powershell command.


$web= Get-SPWebApplication "http://webApplication URL under which HNSC needs to be created"

New-SPSite "http://MySiteA1.Sharepoint.com" -OwnerAlias "Domain\UserName" -HostHeaderWebApplication $web -Name "MySiteA1"

This should ideally create your Host Named Site Collection. 

Sometimes it may give a warning on the powershell window like below



WARNING: The port specified for the new host header site does not match any known bindings in the specified Web Application. The new site will not be accessible if the Web Application is not extended to an IIS Web Site serving this port.


  1. Go to IIS Manager (type inetmgr from Run)
  2. Find the web application to which we have added the site collection.Right click on it and select Bindings


  3. Click "Add"  bindings to make an entry
  4. Click OK
  5. Open hosts file.(Type drivers from Run, within etc folder)
  6. Add an entry to the hosts for the site collection like below
  7. You will be able to browse your site after giving the URL(You may need to select the template). 
NOTE: If you are prompted credentials  again and again without allowing you login then you will have to disable loop back checking


1 comment: