Fully configure host header for Web application (Step-by-Step)

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

About Thuan Soldier

I have been rummaging on SharePoint maze.
Tagged . Bookmark the permalink.

31 Responses to Fully configure host header for Web application (Step-by-Step)

  1. Denis says:

    Soon will be useful for me, thanks!

  2. Pingback: SharePoint Maze

  3. Sergio says:

    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.

  4. Aryan Nava says:

    Best Alternate Access Mapping post in Internet

  5. Pingback: Host header for SharePoint 2010 Web Applications | Virtualize SharePoint and SharePoint Virtualization

  6. Junaid says:

    Very nice post. Thanks dude. keep up the good work… :)

  7. Towerblock says:

    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?

  8. Karthick says:

    What if, the SharePoint 2010 Web Application is on a different port number, other than 80? like 2222 for example?

  9. Salman says:

    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.

  10. Salman says:

    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

  11. Software says:

    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.

  12. Pingback: Fully configure Host Header for new Web Application with PowerShell « The Soldier

  13. Pingback: Fully configure Host Header for new Web Application with PowerShell – Thuan Soldier

  14. Herschel says:

    Thanks!

  15. shashi kumar says:

    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..

  16. Bisi says:

    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.

  17. Sagar says:

    It helped me a lot. Thanks for your posting.

  18. Ashraf says:

    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

  19. Pingback: Mehrere Webseiten, Flash, http und www - MCSEboard.de MCSE Forum

  20. surekha says:

    Thanks . It resolved my errors

  21. attila79 says:

    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

Leave a Reply