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 are wondering why we need a host name. I will try to explain the purpose.You have the following website for a user:http://servername:67655http://servername:88813http://servername:12345 Let us say that each of them represents the following:
The problem is the difficulty in using those URLs since there is no meaning associated with them. A better solution would be:http://finance.corp.comhttp://hr.corp.comhttp://research.corp.comSo this neat and clean approach requires configuring Host Headers for the SharePoint web applications. The host header configured will be passed in the HTTP header message. The host header has to be published inside a DNS server to get it resolved to an 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 AimWe are trying to create a web application with the following name:http://myapp.server.netThe following are the steps involved:Step 1: Create the Host NameOpen the hosts file from the following location:C:\Windows\System32\drivers\etcEnter the following line into it and save the file:127.0.0.1 myapp.server.netNow the file content looks like:
Step 2: Create Web ApplicationOpen the SharePoint Central Administration and create a new web application.
Please note to set the following properties:Port: 80Host Header: myapp.server.netThe 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.http://myapp.server.netStep 3: Disable LoopbackIf you get a prompt for the user and you may face the following issues:
This shows that there is a problem with the Loopback configuration. This situation should occur only when we access the application from the server machine.For fixing the problem we have to disable the Loopback value inside the registry.Open the Registry Editor (regedit.exe) and locate the following key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LsaCreate a new Key Value of type DWORD inside it and set the value to 1:Step 4: Test the Host NameNow 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.ReferencesUnderstanding Host HeadersLoopback Information
SummaryIn this article we have explored how to quickly setup a Host Name for the SharePoint Web Application. In real-world scenarios the SharePoint Administrator must work with the Network Administrators to configure these entries.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: