Posts Tagged ‘DNS’

Create a user friendly URL for your SharePoint site

August 9, 2009

Often we need to create a user friendly URL for our SharePoint site like http://demo.sharepoint.com.

Following are the major activities needed to be performed to achieve this:

  1. Create a DNS entry
  2. Add an Alternate access mapping
  3. Set the host header in IIS web application


Create a DNS entry

Add a record for demo.sharepoint.com in the DNS server. Your IT administrator should be able to do it for you.

However, a DNS Server is not necessary. The hosts file can also be used, but that means the hosts file must be edited on each client.

Host file path:  “%WinDir%\system32\drivers\etc”


Add an Alternate access mapping:

  1. Open Central Administration site.
  2. Click on Operations tab.
  3. Under “Global Configuration” section, click on “Alternate access mappings”.
  4. 1

  5. Click on “Show All” menu in the right and then click on “Change Alternate Access Mapping Collection”.
  6. 2

  7. Select the web application for which you wish to create a user friendly URL. In my case the name of the Web App is DemoApp.
  8. 3

  9. Click on “Edit Public URLs”.
  10. 4

  11. In the “Public URLs” section, in “Default” text box, enter the fully qualified URL for the web application. In my case it is http://demo.sharepoint.com. In the “Intranet” text box enter the original URL of the web application.
  12. 5

  13. Click  save.


Set the host header in IIS web application

Note: This activity is to be performed on all the front end servers.

  1. Open IIS.
  2. Right click on the web application and select properties. In my case, the Web App name is DemoApp.
  3. 6

  4. Click on “Advanced…”.
  5. 7

  6. Click on Add”.
  7. 8

  8. Fill the  TCP port and Host Header Value as shown below and click OK.
  9. 9

  10. Your screen should like as shown in the screenshot below.
  11. 10

    Note: If you have your site at port 80 in that case you need not add a new identity. Instead you can edit the existing entry and specify the host header value for it. A screenshot of that is below:


    11

  12. Click Ok and apply.
  13. Restart IIS.

You should be able to access your site now using the URL http://demo.sharepoint.com.

12