Host header (aka domain names or host names) let you assign more than one site to a single IP address on a IIS Web server. In SharePoint context, may you need individual host-named such as http://thuansoldier.net instead of http://thuansoldier/.

When you create new Web application and then create new site collection, you will make difficulties for end user. They don’t want complicated URL with port number. In this post, I will configure host header via DNS and IIS 7.5. in order to facilitate URL of Web application. All of them are visual but you can use Windows PowerShell to do this rapidly.
Create new Web application
Open Central Administration > Application Management > Manage web applications (under Web Applications). Click New in Ribbon.
I will select Classic Mode Authentication because I haven’t configured Kerberos yet for fully configuring Claim-based Authentication. Under Name, you can type name of Web application. You should name it simply to remember and manage. Please notice under Port and Host Header. Because I want to facilitate URL for end-user thus I select port 80. I continue to type URL: portal.ict24h.net.

At Security Configuration settings, I will keep by default all. Under URL at Public URL, I delete port 80 and keep so as below image.
I use exist application pool. Under Database Name at the Database Name and Authentication, I reduce name of Content database because GUID is so complicated. This make you manage content database effectively.

Now, you can select service application connection and then click OK to create new Web application.
Register the host header in DNS Server
In my DNS server, I create new host A.
Type host name under Name and IP of Web server. Click Add Host.

Configure host header for a Web application
Above all, you check Web applications in Central Administration or IIS Website. Because I will do configuration in IIS thus I will check exist Web application in IIS.
In IIS Manager, right click in Web application that needs to be configured host header and then click Edit Binding. In Site Bindings dialog box, click Edit. At IP address option, select IP address of DNS Server. Under Host name, type your host name. My domain name is ict24h.net thus I want to use my SharePoint site with this domain name. Click OK.

Open Central Administration > Application Management, under Web Applications , click Configure alternate ccess mappings. Verify that the URL for the default zone is set correctly.

However, when you open portal.ict24h.net whether in Internet Explore 8 or Mozilla Firefox 3.5, you will encounter 404 Page Not Found error. What’s up? Yes, you haven’t created Site collection in your Web application yet. Thus you will encounter this error.
At Central Administration, click Application Management > Create site collections (under Site Collections). Please notice your Web application that you just created namely portal.ict24h.net.

Then configure some information. Open your site collection with URL portal.ict24h.net.

I want to share basics in this post because I saw some questions about it in SharePoint 2010 – Setup, Upgrade, Administration and Operation.
I hope this post helps everyone.
2:10 GMT +7 June 22, 2011






Thanks for the post.
Thank you, Phillip
Soon will be useful for me, thanks!
You’re a real deep thikner. Thanks for sharing.
Pingback: SharePoint Maze
Hi Thuan, thanks for the post, but what happen when you want to change the host header of an existing web application?
What happen did you see? I changed the host header in existing web application successfully . After you configure host header for existing web application, you must restart DNS to update A record and reset IIS by using iisreset command. It will be get things done.
Best Alternate Access Mapping post in Internet
Pingback: Host header for SharePoint 2010 Web Applications | Virtualize SharePoint and SharePoint Virtualization
Very nice post. Thanks dude. keep up the good work…
Really nicely written! I tried though and am having a problem. After creating Web Application, Site Collection, updating DNS when I go to the new website I get prompted for login credentials. I try logging in as the administrator and it never lets me in. Any ideas?
What if, the SharePoint 2010 Web Application is on a different port number, other than 80? like 2222 for example?
Thanks for making our lives easier.
Though I am getting a login error when I try to login.
Any idea, it shows the login window.
Just used this article and it worked out wonderful.
Except I got a login window for authentication.
Use the following url to solve the issue.
http://support.microsoft.com/kb/896861
Thanks again to Thuan Soldier !
Cheers
Salman
Hello There. I discovered your weblog using msn. This is a very neatly written article. I will be sure to bookmark it and come back to read more of your helpful information. Thank you for the post. I’ll definitely return.
Pingback: Fully configure Host Header for new Web Application with PowerShell « The Soldier
Pingback: Fully configure Host Header for new Web Application with PowerShell – Thuan Soldier
Thanks!
how about creating 3 web applications on different ports..can we map to different DNS or IP addressess..and how this will behave in production with NLB balanced.. Please give some insight..
I followed this step and was able to create web application and site collection. However, I cannot login to the top level site collection, it kept on bringing the login box. Any help will be appreciated.
Thank.
Hi Bisi, to fix your issue try the following below,
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:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Create a new Key Value of type DWORD inside it and set the value to 1
Good luck!
sorry the DWORD to create is DisableLoopbackCheck and set the value to 1
Thank you
it worked >>>
Thanks Valentine. You help me a lot.
just check in case this link helps..
http://www.jppinto.com/index.php/2009/06/you-receive-an-http-error-4011-error-when-accessing-a-moss-sharepoint-2007-site-on-a-web-front-end/
It helped me a lot. Thanks for your posting.
Hi,
Thank you a lot for a really great post.
It was so clear and pedagogical post which helps me to save hours and headacke.
Thanks again
//Ashraf
Pingback: Mehrere Webseiten, Flash, http und www - MCSEboard.de MCSE Forum
Thanks . It resolved my errors
I have an enviroment SharePoint Server 2010 in virtual machine. My host system is Windows 7 64 professional. Is it possible access the host header deployed in the guest system SharePoint by the host system? Because I tried following your instructions but it only works inside the virtual machine..
I modified the file host inside windows 7 but I keep getting error during access…
Thanks
You will be able to configure host header in your case. Just need to edit the file host like the following example:
127.0.0.1 http://www.abc.com
After editing, reset IIS > iisreset /nofoce