How to Create a Host-Named Site Collection in SharePoint 2013 Using a PowerShell Script

Traditionally, SharePoint has utilized path-based site collections when it comes to creating site collections. For SharePoint 2013, however, Microsoft has introduced a new type of site collection configuration: Host-Named Site Collection (HNSC). This new type of configuration enables you to assign a unique hostname to a site collection so that it doesn’t share the same hostname as a path-based site collection (for example, http://header.bamboosolutions.com versus http://mySPO15). In addition, the HNSC has its own separate DNS which makes your SharePoint server simple to set up, organize, and operate. In this article, we’ll walk you through the steps needed to create a host-named site collection using a PowerShell script.

Before you begin, make sure that the user running the Windows PowerShell cmdlets has the following memberships on all databases that will be used:

  • db_securityadmin
  • db_owner

Additionally, the user running the script on the server must be a member of the Administrators group that can run the PowerShell script as an administrator.

Step 1: Create a new Host-Named Site Collection

To begin, go to Menu > Start and select All Programs > MS SharePoint 2013.

Run the SharePoint 2013 Management Shell as an Administrator.

Next, type on the following script:

New-SPSite <your new HNSC>-OwnerAlias <Domain-NameUserName> -HostHeaderWebApplication <your current site collection>

In this example, we’ll be using the following:  New-SPSite http://header.bamboosolutions.com -OwnerAlias bamboovnspinstaller -HostHeaderWebApplication http://trangf15sql

Step 2: Binding in IIS Manager

Go to Menu > Start and select Administrative Tools and select Internet Information Services (IIS) Manager.

Next, select your site from the list (in this example, we’ll be selecting the site SharePoint 80) and click on Edit Bindings.

Click Add Site Binding.

In the dialog box, you will need to do the following:

  • Select the type
  • Select the IP Address
  • Enter your HNSC URL header.bamboosolutions.com in the Hostname text box.

Once you are finished, click OK.

Next, from the right panel, under Manage Web Site, click on the Restart link.  This will update the new HNSC for the site collection.

Step 3: Add the IP host in the client machine to Run

Open the window Run and type in the following: “C:WindowsSystem32driversetc” and open the file hosts in Notepad.

Type the IP host and click Save.

In this example, we’ll be using the following IP: 172.16.xx.xx header.bamboosolutions.com

Step 4: Run and configure your site

Now that your site has been created, you can open the new site collection in SharePoint and configure it as needed.

Questions? Contact us or check out our online documentation for more information!

SharePoint Online

The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.

Supports Classic and Modern sites for SharePoint Online/Microsoft 365

Small Business Pricing and Discounts

SharePoint

Top SharePoint Online Products

Experience greater power and savings by bundling our SharePoint apps and cloud parts.


Calendar Plus


Carousel


Employee Directory Plus


Org Chart Plus


Simple Search


Tabify


Tree View

 

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2016, 2019, 2022 – Classic Pages Only

SharePoint

Top On-Premises Only Products

Experience greater power and savings by bundling our SharePoint apps and web parts.


Calendar Plus


Data Viewer


Password Change


Password Expiration


Password Reset

 

Our team of Microsoft 365 Technology Consultants helps you get the most out of your Microsoft technology, we have the best Microsoft 365 talent to streamline your organization.

Consulting to Streamline Your Department

M365 Plus

Managed Services

Microsoft 365

Consulting to Streamline Your Department


Human Resources


Information Technology


Marketing Campaigns


Healthcare


Sales

 

Our Consultants Have What You Need

Federal Contractors