Click here to Skip to main content
13,835,319 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 6 Jul 2012
Licenced CPOL

SharePoint 2010 – Creating Host Name for Web Application

, 6 Jul 2012
Rate this:
Please Sign up or sign in to vote.
In this article we can explore how to quickly setup a Host Name for the SharePoint Web Application.

SharePoint 2010 – Creating Host Name for Web Application

In this article we can explore how to quickly setup a Host Name for the SharePoint Web Application.

Why we need Host Names?

I hope some of you might be having a question in mind why we need a host name.  I will try to explain the purpose.

You have the following website for a user:

You said that each of the represents the following:

  • Financial Site
  • HR Site
  • Research Site

The problem is difficulty in using those urls as there is no meaning associated with it.  A better solution would be:

So this neat and clean approach requires configuring Host Headers for the SharePoint web applications.   The host header configured will get passed in the HTTP header message.  The host header has to be published inside a DNS server to get it resolved to IP and port.

 The approach used here can be used across Windows 7 and Windows 2008 machines.  Please note that you can even configure host names with site collections too.

Our Aim

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


Following are the steps involved:

Step 1: Create the Host Name

Open the hosts file from the following location:


Enter the following line into it and save the file:


Now the file content looks like:


Step 2: Create Web Application

Open the SharePoint Central Administration and create a new web application. 

Please note to set the following properties:

            Port: 80

            Host Header:

The properties are highlighted below:

After entering all the details click the Save button.  Wait for the operation to be completed and you can try entering the url in the browser.


Step 3: Disable Loopback

If you get a prompt for the user and you may face the following issues:

  • There is continuous prompt for the credentials
  • HTTP 401.1 error

This shows that there is a problem with the Loopback configuration.  This case should occur only when we access the application from the server machine.

For fixing the problem we have to disable Loopback value inside registry.

Open Registry Editor (regedit.exe) and locate the following key:


Create a new Key Value of type DWORD inside it and set the value to 1


Step 4: Test the Host Name

Now you can try entering the host name in the browser and you should be able to access the site after entering credentials.

If you can see the site as shown above then you are done with the Host Header configuration.



In this article we have explored how to quickly setup a Host Name for the SharePoint Web Application. In real world scenarios the SharePoint Administrator need to work with the Network Administrators to configure these entries.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Jean Paul V.A
United States United States
Jean Paul is a Microsoft MVP and Architect with 12+ years of experience. He is very much passionate in programming and his core skills are SharePoint, ASP.NET & C#.

In the academic side he do hold a BS in Computer Science & MBA. In the certification side he holds MCPD & MCTS spanning from .Net Fundamentals to SQL Server.

Most of the free time he will be doing technical activities like researching solutions, writing articles, resolving forum problems etc. He believes quality & satisfaction goes hand in hand.

You can find some of his work over here. He blogs at

You may also be interested in...


Comments and Discussions

Questionhow to create Hosted site collection? Pin
Sachin_Khairnar18-Sep-14 19:32
memberSachin_Khairnar18-Sep-14 19:32 
QuestionThanks a lot Pin
Member 4159818-Dec-13 2:10
memberMember 4159818-Dec-13 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190114.1 | Last Updated 6 Jul 2012
Article Copyright 2012 by Jean Paul V.A
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid