Host Named Site Collections SharePoint

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:

 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/dis-advantages:

Path-Named:

* These sites can be accessed from any zone that you configure.
* 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

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>.


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!

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.





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"



Plan for host-named site collections

Comments

Popular posts from this blog

"There's a configuration problem preventing us from getting your document. If possible, try opening this document in Microsoft Word." Office WebApp Error

"Sorry, Word Web App can't open this ... document because the service is busy." Office WebApp

Unable to create a "Send to Connection"- verification failed -url is a not a valid routing destination