Alexander's Blog

Sharing knowledge with the global IT community since November 1, 2004

How to Change the Host Header of a MOSS Site

/
/
ad-mania

If you’ve configured your SharePoint site with a specific URL (host header), e.g. http://webportal and then later decided that you want to change it to another URL, such as sharepoint.seattlepro.com, you can use the Alternate Access Mapping feature of Microsoft Office SharePoint  Server (MOSS) 2007. Here’s how.

1. Start SharePoint 3.0 Central Administration.

2. Click on the Operations tab.

3. Under Global Configuration section click on Alternate access mappings.

4. Click on Show All in the upper right-hand corner and then click on Change Alternate Access Mapping Collection.

5. From Select An Alternate Access Mapping Collection window, click the URL that you would like to change, e.g. http://webportal.

6. Click Edit Public URLs.

7. Change the URL listed in the Default box to the one you want. For example, change it from http://webportal to http://sharepoint.seattlepro.com.

changing_url
8. Click Save.

9. The next step is to update the information in Internet Information Services (IIS). Start IIS Manager. In our example, we will assume you are running IIS 7.

10. Highlight the Web site whose URL you want to change.

11. In the Actions pane click Bindings (or right-click the Web site and select Edit Bindings).

12. Highlight the entry in the Edit Site Binding window and then click Edit.

13. In the Host Name box enter the new URL that you would like to use. For example, sharepoint.seattlepro.com.

site_binding

14. Click OK, then click Close.

15. Go to the command prompt and run iisreset to restart Internet services.

16. You should now be able to use the new host header and access the site with the new URL (e.g. http://sharepoint.seattlepro.com).

NOTE: If your Web site needs to be accessible from the Internet and you are using Microsoft ISA Server, or another firewall, you need to make sure that you update the DNS server and the ISA Server rule that allows you to access the Web site from the external network. For example, you need to add a host record for sharepoint.seattlepro.com in a DNS server that is accessible from the Internet and add the URL sharepoint.seattlepro.com on the Public Name tab of the ISA Server rule that is publishing the Web site.

Using Alernate Access Mapping to Configure a Different URL for Internal Use

If you want to use a different URL for the intranet site internally (e.g. http//intranet), you can add that URL in step 6. On the Alternate Access Mappings page, instead of clicking on Edit Public URLs, click on the link Add Internal URLs. In the Add Internal URL box type the URL that you want to add, e.g. http://intranet, then click Save. You still need to go to IIS Manager and in step 13 add a Site Binding for intranet. Your site bindings will look like this.  Notice that you don’t need to type http:// in the Host Name box. Simply type the host header that you want to use (in our case its intranet).

site_bindings

Make sure you don’t forget step 15 after modifying the bindings. That’s it. Now your users can access the intranet site internally by typing http://intranet and externally by typing http://intranet.seattlepro.com.

This is one of many examples of how Alternate Access Mappings can be used in MOSS 2007. It demonstrates how the end user may type a different URL to access the site then the URL that is received by the Internet Information Services (IIS). With Alternate Access Mapping you can also associate multiple internal URLs with a single public URL, using one of 5 different authentication zones: Default, Intranet, Internet, Custom, and Extranet.


Copyright ©2008 Zubair Alexander. All rights reserved.

  • Facebook
  • Twitter
  • Linkedin

3 Comments

  1. Your blogs on AAM and host headers are great. I was able to follow them and demonstrate this to a client. Thanks.

  2. Tejas,
    If a site requires a port number (other than the default port 80) then you must type the port number at the end of the URL.

    There are at least three ways to host multiple sites on the same Web server:
    1. Use a different IP address for each site.
    2. Use a different port number for each site.
    3. Use host headers to host multiple sites on a single IP address using default port 80 for all the sites.
    One limitation of using host headers is that you can’t use SSL with all of them. However, you can use a wildcard to host multiple sites with host headers and use SSL.

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar