How to use Host headers for SharePoint site ?
If we have a running site on port 80, then have created another new web application and a site collection (collaboration) using the port which was displayed by default while creating the web application, where now the Url is "http://servername :47854"Now if we want to provide a valid url to the above url what are the suggested steps, that should be achieved with the Host headers or DNS entry.
Description:
You will want to setup Alternate Access Mappings for the site (in Central Admin > Operations). From here you can add an additional host header, then update the site in IIS with the new host header. So this will simply setup the same site at another address. You will have to update DNS accordingly.
The Exact steps are as below
You create a new web application and a site collection, which will give you a url which would contain the server name and the port number (e.g. http://servername:7788)
Now instead of providing the url to the user there should be a easy was by which the user should be able to see the site, which is when the user types "portal" it should take him to http://servername:7788
To Get that please follow the steps as shown below
1) Ask the Systems team to place a DNS entry called portal
2) On the SharePoint installed server go to C:\WINDOWS\system32\drivers\etc\Hosts . Open the hosts file with notepad and enter the IP address of the SharePoint server, give space (or hit the tab button once) and then type the DNS name which is portal (e.g 172.18.00.00 portal)
2) On the same server open IIS (start-->RUN-->Inetmgr-->Enter)
3) Expand the folder web Sites and right click on the site and select properties. On the tab "web Site", below web site Identification click on the button Advanced.
4) Under Multiple Identities for the web site click on ADD, then in the TCP port enter 80 and in the host Header Value type port, then click ok, ok and apply.
5) go to the central administration and click on Operation, under Global configuration select "Alternate Access Mapping" in here click on the web application (in our case http://servername:7788) you will be taken to a next page called Edit Internal URLs in here just click the cancel button, when you do that you will be taken to another page called Alternate Access Mappings, in here please click on Add Internal Urls, you will now be taken to another page called ADD Internal URLS . make sure that you have selected the right site collection on the right side, then in the Add Internal Url type http://portal and click Save.
You can now open a browser and type portal and hit enter. you will be taken to the site "http://portal/pages/default.aspx".