Create a Web Application With Host Header in SharePoint 2010

In this article we will learn how to create a web application with host header in SharePoint 2010. First we need to know what a host header is.

Host Header: Host header is nothing but providing a related name as the URL for the web application, by default SharePoint takes only the local server name as a URL and then render the data's from the content DB.

Here my server name is App1, so SharePoint takes only my local server name as the URL.

http://App1:222

We are trying to create a web application with the following name:

http://heureuxtech:222

So the following is the procedure for creating a web application with host header.

Step 1

Create a web application using Central Administration:

create a new web application

Here I specified the host header as heureuxtech and created one web application, you can see in the following picture, the URL created based on the host header.

host information

Step 2

Create the root site for the web application and run that URL, it will get the following error:

error

Step 3

Go to C:\Windows\System32\drivers\etc\host to register your host header, open the host file and type as given below:

host file

Step 4

Open regedit to disable the loopback, go to Run from the Start menu and type "regedit" and use the following path:

registry editor

Step 5

Create a new Key Value of type DWORD and name it DisableLoopBackCheck:

DWORD Value

Step 6

Right-click that DisableLoopBackCheck and click modify and set the value to 1 to enable it.

edit DWORD

Step 7

Open a browser and paste in the URL in the address bar and hit Enter and wait for the following screen:

web application with host header