{"id":1257,"date":"2014-07-15T14:03:26","date_gmt":"2014-07-15T13:03:26","guid":{"rendered":"http:\/\/blog.repsaj.nl\/?p=1257"},"modified":"2015-05-29T15:17:50","modified_gmt":"2015-05-29T14:17:50","slug":"sp2013-host-named-site-collections","status":"publish","type":"post","link":"http:\/\/blog.repsaj.nl\/index.php\/2014\/07\/sp2013-host-named-site-collections\/","title":{"rendered":"[SP2013] Host named site collections"},"content":{"rendered":"<p>With SharePoint 2013, Microsoft claims we need to rethink our architecture. Host named site collections are the way to go, and preferably all within the same web application. But what are host named site collections and what do we need to take into account when setting this up?<\/p>\n<p><strong>Update. <\/strong>Check out\u00a0part 2, detailing how to set up host named site collections in combination with AD FS and SSL:\u00a0<a href=\"http:\/\/blog.repsaj.nl\/index.php\/2014\/07\/sp2013-host-named-site-collections-adfs-claims-and-aam\/\">http:\/\/blog.repsaj.nl\/index.php\/2014\/07\/sp2013-host-named-site-collections-adfs-claims-and-aam\/<\/a><br \/>\n<!--more--><\/p>\n<h2><\/h2>\n<p>&nbsp;<\/p>\n<h2>Host header webapps in SharePoint 2010<\/h2>\n<p>For the readers not already familiar with host headers, we\u2019ll start with a bit of history. Previous version of SharePoint have been constantly redesigned, as we all know so well. Building towards Office 365 \/ SharePoint Online, Microsoft had to overcome some challenges serving multiple customers from the same farm.<\/p>\n<p>To be able to share a farm, Microsoft introduced the notion of <em>site subscriptions <\/em>in SharePoint 2010. This was an evolution of something called \u201cscalable hosting mode\u201d which was in the product since SharePoint 2003. A site subscription is a 1-n relation between a subscription and site collections. Together with <em>subscription aware<\/em> service applications, this allows us to provide seemingly \u201cseparate\u201d environments to multiple tenants within a single farm. \u201cSeparate\u201d, since they still share things on a technical level.<\/p>\n<p>&nbsp;<\/p>\n<h3>SharePoint URL\u2019s<\/h3>\n<p>But what about the site collection URL\u2019s? Traditionally, a <em>path-based<\/em> SharePoint URL pointing to a site collection consists of the following parts (figure 1):<\/p>\n<p><a href=\"http:\/\/blog.repsaj.nl\/wp-content\/uploads\/2014\/07\/Siegmund_Host-Named-Site-Collections_01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1258\" src=\"http:\/\/blog.repsaj.nl\/wp-content\/uploads\/2014\/07\/Siegmund_Host-Named-Site-Collections_01.jpg\" alt=\"Siegmund_Host Named Site Collections_01\" width=\"292\" height=\"66\" \/><\/a><\/p>\n<ol>\n<li>The protocol, usually http or https.<\/li>\n<li>The URL which is bound to the web application.<\/li>\n<li>A managed path.<\/li>\n<li>The site collection relative URL.<\/li>\n<\/ol>\n<p>This imposes a problem, since Microsoft wanted to give tenants the option to configure their own URL\u2019s, instead of having to use a predetermined one. So for that purpose, they introduced the host header web application. Within the host header web application, we can create site collections which have their own URL bound to them. This is done via PowerShell by specifying the HostHeaderWebApplication parameter for New-SPSite:<\/p>\n<pre class=\"prettyprint\">New-SPSite \u201chttp:\/\/portal.contoso.com\u201d -HostHeaderWebApplication \u201chttp:\/\/HNSC01.contoso.com\u201d -Name \u201cPortal\u201d -Description \u201cCustomer portal\u201d -OwnerAlias \u201ccontoso\\administrator\u201d -language 1033 -Template \u201cSTS#0\u201d\r\n<\/pre>\n<p><em>Listing 1: Creating a host named site collection in SharePoint 2010<\/em><\/p>\n<p>So now we can run multiple sites within the same web application, all having different URL\u2019s. Cool!<\/p>\n<p>&nbsp;<\/p>\n<h3>What\u2019s in a name?<\/h3>\n<p>Microsoft doesn\u2019t have a brilliant track record when it comes to naming things. In my opinion this is another example of how things can become confusing. The important things to know are:<\/p>\n<ul>\n<li>When you want to configure multiple web applications supporting <strong>host named<\/strong> site collections, you need to use the <strong>\u2013HostHeader<\/strong> parameter to configure the URL of the web application.<\/li>\n<li>Within IIS we also need to configure that same URL, within the web applications\u2019 <strong>host name<\/strong> bindings. You see where this is kind of odd?<\/li>\n<li>And when you\u2019re then going to configure managed paths, it\u2019s back to host headers again. Hmm\u2026<\/li>\n<\/ul>\n<p>But fine; whether is host header or host name, the goal is to provide site collections with their own URL\u2019s, instead of using the web applications\u2019 URL.<\/p>\n<p>&nbsp;<\/p>\n<h2>Setting it up<\/h2>\n<p>There is a pretty elaborate article on how to set up host named site collections on TechNet[i], so I\u2019ll won\u2019t go into details in this article. The basic steps are:<\/p>\n<ul>\n<li>Creating a web application like you normally would do. This will have its own URL and a root site collection has to be created for that URL (that has to do with processes like search which will hit this URL, so it needs to exist). Note: should you want to use more than one web application supporting host named site collections, you need to use the \u2013HostHeader parameter for the New-SPWebApplication cmdlet, specifying the URL. Each webapplication will need its own IP address.<\/li>\n<li>Make sure the web application in IIS is the default one, which serves like a \u201ccatch all\u201d for unknown incoming URL\u2019s.<\/li>\n<li>Create site collections using the New-SPSite PowerShell commandlet, passing in the \u2013HostHeaderWebApplication parameter.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Managed paths<\/h3>\n<p>Alongside the above mentioned per-site collection URL\u2019s, we can also create host named site collections with a managed path. This too can only be done via PowerShell, with the New-SPManagedPath cmdlet specifying the \u2013HostHeader parameter.<\/p>\n<p>Suppose you want to create portal.consoto.com\/departments\/marketing, you would configure:<\/p>\n<ul>\n<li>A managed path for \/departments (wildcard).<\/li>\n<li>A host header site collection at http:\/\/portal.contoso.com, this needs to exist before we can create a site collection which uses the managed path.<\/li>\n<li>A host header site collection at http:\/\/portal.contoso.com\/departments\/marketing.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Microsofts&#8217; advise<\/h2>\n<p>As said in the introduction, Microsofts official advice is now to use host named site collection by default. Also, they advise us to place those site collections in one single web application. The reason behind this is quite simple: they use the same approach themselves in Office 365. That automatically means it\u2019s the best tested option by default, and Microsoft will invest more time into making it work brilliantly opposed to the traditional method of creating site collections (which is not used within Office 365).<\/p>\n<p>A second advantage is that a host named site collection is very portable. Since the URL is now bound to the site collection, you can move the entire thing without changing the URL of the content. So users can view their pages, lists and documents regardless of the web application or farm the site collection is in. That also implies you can move sites towards the cloud and back without users even noticing the difference. That is, of course, based on the assumption you\u2019ve got things like authentication set up properly. And moving stuff to the cloud is what Microsoft likes.<\/p>\n<p>But is it all truly amazing, or are there considerations to be made?<\/p>\n<p>&nbsp;<\/p>\n<h3>Migration<\/h3>\n<p>To start with; there\u2019s migration. Companies coming from SharePoint 2010 will probably not have an architecture with host named site collections. So moving towards this architecture means you\u2019ll have to rethink your URL\u2019s and some of them will most likely change, breaking content links.<\/p>\n<p>Also, your IT decision makers might wonder: what\u2019s the real benefit here? Apart from the testing and commitment already mentioned, your sites are just as fine without their own host name. Sure, some of the new bits in 2013 will not work without hacking, like the request management service. But for most companies, the functionality they use on a day-to-day basis will be just fine. So one might wonder: why go through all the trouble?<\/p>\n<p>&nbsp;<\/p>\n<h3>One webapp, bye bye governance?<\/h3>\n<p>There\u2019s also the matter of governance. A web application comes with settings. For instance; there\u2019s a link between a web application and the service application proxy group it\u2019s using. So when your requirements are dictating different sites need different service application instances; one web application isn\u2019t feasible. You can easily check out the settings per web application in Central Administration to make a list of governance issues when it comes to using a single web application.<\/p>\n<p>Also, your company might have processes in place which automate the site creation workload. When there is a self-service system facilitating the creation of site collections, take into account that this will need to be changed as well.<\/p>\n<p>&nbsp;<\/p>\n<h3>SSL<\/h3>\n<p>Another issue arises when you want to make use of SSL certificates. It is possible to use SSL, but that requires we make use of wildcard certificates (*.contoso.com). Host named site collections would have to be named site1.contoso.com, site2.contoso.com, etc. to pass the browser validation. Think of your sites in SharePoint online, which are hosted on <a href=\"https:\/\/tenant.sharepoint.com\/\">https:\/\/tenant.sharepoint.com<\/a>, where *.sharepoint.com will be the wildcard SSL certificate used.<\/p>\n<p>When you want to use more than one certificate for different second level domain names, creating multiple web application is the only option you\u2019ve got.<\/p>\n<p>&nbsp;<\/p>\n<h3>Alternate Access Mappings<\/h3>\n<p>Using alternate access mappings on web application level becomes pointless when you&#8217;re using host named site collections. Since each site collection is bound to a URL, the AAM configured on the web application level don&#8217;t really matter any more. Instead, the Set-SPSiteUrl Powershell cmdlet can be used to add more than one URL to the same site collection. This requires good planning and I would advise only using it when you&#8217;ve got a real good reason to.<\/p>\n<p>&nbsp;<\/p>\n<h2>Conclusion: it depends<\/h2>\n<p>As so often with SharePoint, it\u2019s a matter of: it depends. It depends whether you want to spend the time setting this up. Whether you want to use the 2013 bits which require this architecture. Whether you need the governance of settings which you cannot get with this architecture. Whether you care about Microsoft testing this and telling us \u201cit\u2019s the future\u201d. Etcetera.<\/p>\n<p>There\u2019s a lot of speculation about the future of SharePoint. And although Microsoft is pushing the cloud, many believe that on-premises will be getting its share of loving at the upcoming SPC in 2014. So maybe the traditional web application model won\u2019t be so deprecated after all, who knows? But for newly built SharePoint 2013 installations, it might be worthwhile at least considering the option of host named site collections.<\/p>\n<p>&nbsp;<\/p>\n<h3>Recommended reads<\/h3>\n<p>For everyone who considers implementing host named site collections, I recommend the following articles:<\/p>\n<ul>\n<li>Host-named site collection architecture and deployment (SharePoint 2013)<br \/>\n<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc424952(v=office.15).aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/cc424952(v=office.15).aspx<\/a><\/li>\n<li>What every SharePoint Admin Needs to Know About Host Named Site Collections by Kirk Evans<br \/>\n<a href=\"http:\/\/blogs.msdn.com\/b\/kaevans\/archive\/2012\/03\/27\/what-every-sharepoint-admin-needs-to-know-about-host-named-site-collections.aspx\">http:\/\/blogs.msdn.com\/b\/kaevans\/archive\/2012\/03\/27\/what-every-sharepoint-admin-needs-to-know-about-host-named-site-collections.aspx<\/a><\/li>\n<li>Host Named Site Collections (HNSC) for SharePoint 2010 Architects<br \/>\n<a href=\"http:\/\/blogs.msdn.com\/b\/markarend\/archive\/2012\/05\/30\/host-named-site-collections-hnsc-for-sharepoint-2010-architects.aspx\">http:\/\/blogs.msdn.com\/b\/markarend\/archive\/2012\/05\/30\/host-named-site-collections-hnsc-for-sharepoint-2010-architects.aspx<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>With SharePoint 2013, Microsoft claims we need to rethink our architecture. Host named site collections are the way to go, and preferably all within the same web application. But what are host named site collections and what do we need to take into account when setting this up? Update. Check out\u00a0part 2, detailing how to<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[7,76,39],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3KFR1-kh","_links":{"self":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/1257"}],"collection":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1257"}],"version-history":[{"count":0,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/1257\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/categories?post=1257"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/tags?post=1257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}