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

Host header (aka domain names or host names) lets you assign more than one site to a single IP address on a web application hosted in the IIS Web server. In SharePoint, you may need specific name for your website e.g. http://thuansoldier.net/ instead of an ugly URL like http://thuansoldier:32431. Having a friendly URL probably makes your end-users much easier to access SharePoint. They don’t have to remember the port number

In this article, I’m going to show you how to configure Host Header in SharePoint through DNS configuration and IIS. You can download my PowerShell script to complete the tasks below https://gallery.technet.microsoft.com/Fully-configure-Host-d4027a48

Create new Web application

Open Central Administration > Application Management > Manage web applications (under Web Applications). Click New in Ribbon.

Select Classic Mode Authentication by default but you can go with claims-based authentication to leverage tons of capabilities from it. Under Name, type the name of the new Web application.  Use default port 80 as it will be used through HTTP. You can select another port but make sure it doesn’t conflict with any common port (e.g. 21..). Under Host Header, type the full domain of the web application you are going to use.

At Security Configuration settings, keep all by default all.

Use existing application pool (optional) Under Database Name at the Database Name and Authentication, remove GUID and keep the name of content database as simple as possible.

Select service application connection if you have and then click OK to create new Web application.

Register the host header in DNS Server

In DNS server, create new host A by click New Host (A or AAA)

Type host name under Name, and the SharePoint server’s IP address. Click Add Host.

Configure host header for a Web application

In IIS Manager, right click the Web application you need to assign host header to and then click Edit Binding. In Site Bindings dialog box, click Edit. At IP address option, select IP address of the SharePoint server. Under Host name, type your host name. Click OK.

Open Central Administration > Application Management, under Web Applications , click Configure alternate access 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.

At Central Administration, click Application Management > Create site collections (under Site Collections). Please notice your Web application that you have just created namely portal.ict24h.net.

Finally, check your website with the friendly URL

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.

You might need to read the series of setting up SharePoint 2013 environment At Work



  1. June 21, 2011 — 9:26 pm

    Thanks for the post.

  2. Denis
    June 22, 2011 — 6:17 am

    Soon will be useful for me, thanks!

    • August 25, 2011 — 5:20 am

      You’re a real deep thikner. Thanks for sharing.

  3. Sergio
    August 24, 2011 — 10:30 pm

    Hi Thuan, thanks for the post, but what happen when you want to change the host header of an existing web application?

    • August 25, 2011 — 11:51 am

      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. September 23, 2011 — 2:43 pm

    Best Alternate Access Mapping post in Internet

  5. Junaid
    October 4, 2011 — 8:17 am

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

  6. Towerblock
    December 1, 2011 — 11:26 pm

    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?

  7. Karthick
    December 29, 2011 — 10:20 am

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

  8. Salman
    January 7, 2012 — 9:28 am

    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.

  9. Salman
    January 7, 2012 — 4:52 pm

    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.

    Thanks again to Thuan Soldier !


  10. Software
    February 14, 2012 — 6:45 am

    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.

  11. Herschel
    June 13, 2012 — 12:23 pm


  12. shashi kumar
    July 22, 2012 — 10:43 am

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

  13. Bisi
    July 24, 2012 — 5:18 pm

    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.


    • Valentine Nzekwe
      July 31, 2012 — 3:49 pm

      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:


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

      Good luck!

      • Valentine Nzekwe
        July 31, 2012 — 3:56 pm

        sorry the DWORD to create is DisableLoopbackCheck and set the value to 1

        • Amaru Di
          September 7, 2012 — 10:09 pm

          Thank you
          it worked >>>

        • Pablo Melvin
          April 16, 2013 — 3:52 pm

          Thanks Valentine. You help me a lot.

  14. Sagar
    September 24, 2012 — 4:33 am

    It helped me a lot. Thanks for your posting.

  15. Ashraf
    November 2, 2012 — 12:57 pm

    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


  16. surekha
    January 16, 2013 — 9:20 am

    Thanks . It resolved my errors

  17. attila79
    March 28, 2013 — 6:05 pm

    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…

    • March 29, 2013 — 2:23 am

      You will be able to configure host header in your case. Just need to edit the file host like the following example: http://www.abc.com

      After editing, reset IIS > iisreset /nofoce

  18. February 12, 2014 — 9:10 pm

    Hello Guys

    I have setup my host header as http://mysharepoint.company.com and the admin person has set

    the IP to

    1. Create SP WebApp using this host http://mysharepoint.company.com with port 80

    2. Alter Mapping is pointing to this URL http://mysharepoint.company.com

    3. I use IIS7 to bind the URL http://mysharepoint.company.com with this IP

    I still have problem to get the SP site collection as sites/dst

    Have tried to set the registry with BackConnectionHostnames with the following URL values

    The error message cannot display the web page.

    Please advise.


    • February 13, 2014 — 9:17 am

      Hi Peter,

      Can you please ping to your website to see it is resolvable.

  19. February 13, 2014 — 7:44 am

    Hi guys,

    I have followed all the steps and I am getting this message: This page can’t be displayed.
    It looks it could not get to the site collection.


  20. February 13, 2014 — 2:53 pm

    Hi Thuan,
    Thanks for getting back quickly.
    Yes. I have tried to Ping the IP address and have problem on IP resolved.

    I also tried to use

    It is same error cannot display the web page.


    • February 15, 2014 — 5:33 am

      Do you have any problem with IP resolve? Does the SharePoint site get resolved on the associated IP? Is there any website that uses the same port?

  21. February 15, 2014 — 6:31 pm

    Hi Thuan,

    I have reported to IT and it seems like there is a problem with the DNS failure or load balance issues.
    I can ping the IP and could not get to the SP site. This is port 80 and it is available.
    I will let you know if this is DNS issue.

    Do you any tools that I can check my subhost is configured correctly?

    I cannot access the Production DNS server.

  22. March 15, 2017 — 1:16 am

    very nice post. thanks!

Leave a Reply

© 2018 The Soldier of Fortune.