Migrating to SharePoint Host Name Site Collections 1

According to technet article http://technet.microsoft.com/en-us/library/cc424952.aspx , “Host-named site collections provide a scalable Web hosting solution with each site collection assigned to a unique DNS name. In a Web hosting deployment, each host-named site collection has its own vanity host name URL, such as http://customer1.contoso.com, http://customer2.contoso.com , or http://www.customer3.com”.

Host Name Site Collection is actually a means to have a separate DNS for each site collection rather than having all the site collections follow the URL of the web application (path-based site collections). The advantages and limitations of this approach as well as an overview of Host Named site collections is present at http://technet.microsoft.com/en-us/library/cc424952.aspx

A sample power shell script to create a web application for Host Name Site collections as well as creating a host named site collection under it is as follows:

$webTemplate = “STS#1”

$hostHeaderWebApp = “http://<WebAppName&gt;:<WebAppPort>”

$hostHeaderWebAppPort = <WebAppPort>

$AppPoolName = <AppPoolName>

$AppPoolAccount = <AppPoolAccount>

$firstHostNamedSiteCollection = <URL of Host Name Site Collection>

$firstHostNamedSiteCollectionContentDB = <Content Database for Site Collection>

 

$webApp = New-SPWebApplication -ApplicationPool $AppPoolName -ApplicationPoolAccount $AppPoolAccount -Name $AppPoolName -Port $hostHeaderWebAppPort -AuthenticationMethod NTLM

New-SPContentDatabase -Name $firstHostNamedSiteCollectionContentDB -WebApplication $hostHeaderWebApp

 

$SpSite = New-SPSite $firstHostNamedSiteCollection -ContentDatabase $firstHostNamedSiteCollectionContentDB -OwnerAlias <OwnerDomainAccount>  -HostHeaderWebApplication $hostHeaderWebApp -Template $webTemplate

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.