SharePoint 2016/2013 Administration - How To Create Host Header Web Applications

When we deal with Web Application URLs in SharePoint Environment it is quite important to review the URL Structure. By default when we create any SharePoint Web Application, it takes server name as default while preparing the URL structure as follows-

http:// <Server Name>:<Port>

Using Host Header we can overwrite this default behavior by SharePoint Engine.

In this article we will look at the steps to create Web Applications with Host Headers.

If we look for the Web Application List created we can see only two Web Applications created as shown in the figure below:

1

If we closely look for Web Application SharePoint -80 has been created with defaults and that is why if you see to the URL you will notice the URL structure is http:// <Server Name>:<Port>

Now in order to create the Host Header based Web Applications we need to follow the below steps:

2

Add DNS Entry for Host Header

  • Search for DNS on Windows Server

3

  • Right Click on the Domain Name
  • Choose New Host

4

  • Specify the Name Host Header
  • Specify IP address to the Server
  • Click Add Host Button

5

6
Create Web Application Using PowerShell

As we know that default Authentication Mode for a Web Application is Classic when it is created using PowerShell. But here we have to create a Web Application in Claims Based Authentication Mode and that is why it is necessary to initialize the authentication provider by calling New-SPAuthenticationProvider command which return a fresh object referring Claims Based Authentication

$authenticationProvider = New-SPAuthenticationProvider

Then we need to call for New-SPWebApplication command to create a new Web Application utilizing Host Header as below-

 

  1. New-SPWebApplication -Name “Development – Portal” -Port 2016 -HostHeader “developmentportal.PRASHANT.LOCAL” -URL “http://developmentportal.PRASHANT.LOCAL”; -ApplicationPool “SharePoint – 2016” -ApplicationPoolAccount (Get-SPManagedAccount “Prashant\Administrator”) -AuthenticationProvider $authenticationProvider  

 

9

Once we get this PowerShell command executed using SharePoint Management Shell successfully, we can see the details of the new Web Application created just now

7

Similarly we can go back to Central Administration to look for List of Web Applications and can be able to locate this newly created Web Application

It is important to note the URL of the newly created Web Application and see the Host Header is now present in the Web Application URL Structure as needed.

8

And we are done!!

Hope you find it helpful.

Up Next
    Ebook Download
    View all
    Learn
    View all