Hosting SharePoint on a fully qualified domain name (FQDN)

This blog describes how you can setup your SharePoint Services environment using a FQDN. For a full explanation about what a FQDN is, you can read my previous post about Hosting Reporting Services on a fully qualified domain name (FQDN).

For this example I will modify the host file to use portal.mikeglaser.com as a FQDN. On Windows-based computers, this file can be found in the systemrootSystem32DriversEtc folder. Trough Microsoft Internet Information Services (IIS) you configure the Default Web Site, so it's only accessible through portal.mikeglaser.com. This can be done by changing the default identification and adding the FQDN as a host header value.

After doing so, I open the my SharePoint Services sites using the FQDN. All WSS V2 sites works like a charm, but the WSS V3 sites gives me all kinds of errors.

WSS V2
SharePoint WSS V2 can run in host header mode. After installing WSS but before doing anything in the Administration pages, go to the command prompt and navigate to the Program Files/Common Files/Microsoft Shared/web server extensions/60/bin folder. Run the stsadm.exe tool to create the database using this syntax:

stsadm.exe -o setconfigdb -ds <database server name> -dn <database name> -hh

Once the configuration database has been created, you can then create the sites. Make sure the server's hosts file is updated to specify the domain names you would like.

stsadm.exe -o createsite -url http://portal.mikeglaser.com -ownerlogin <domain><username> -owneremail <email address>

In this example I'm not interested in host header mode and a normal installation of WSS does not require this to run. This way its possible to approach all your sites on a IIS web site using a FQDN, after configuring the host header value in IIS.

WSS V3
Host header mode in SharePoint V3, allows you to create multiple domain-named sites in a single Web application. In Windows SharePoint Services version 2, when scalable hosting mode was enabled, you could extend only one Microsoft Internet Information Services (IIS) Web site. Now, with host header mode, you can have host header-based site collections on multiple Web applications, so you're no longer limited to extending just one IIS Web site. In fact, you can have a mix of path-based and host header-based site collections in the same Web application. In addition, you do not need to specify whether you want to use host header site collections when creating the configuration database. Instead, you can now specify whether site collections should be host header-based or path-based when creating the site collection.

stsadm.exe -o createsite -url http://portal.mikeglaser.com -ownerlogin <domain><username> -owneremail <email address> -hhurl http://www.mikeglaser.com

This allows you to then host both host header sites and normal corporate mode sites on the same web application and same farm.

In this example I'm not interested in host header mode, but a normal installation of WSS does require some configuration steps to run. This way its not immediately possible to approach all your sites on a IIS web site using a FQDN, after configuring the host header value in IIS.

When I open portal.mikeglaser.com in Internet Explorer and profiling my SQL Server, WSS V3 executes the following statement.

exec dbo.proc_getSiteIdOfHostHeaderSite @HostHeader=N'portal.mikeglaser.com'

This stored proc will give a result of 0, because SharePoint isn't configured to use this FQDN. To do so, open your Central Administration web site and change the Alternate Access Mappings of your Web Application. This option can be found under operations.

You can change the default URL to notify WSS or add an additional URL to the list.

When you finished doing the previous steps, SharePoint Services will function with a FQDN.

Summary
As you can see it's not that hard to use a FQDN with SharePoint Services, but you gotta know how.

 

17 thoughts on “Hosting SharePoint on a fully qualified domain name (FQDN)

  1. So, with WSS 2.0 I can get FQDN working by just setting the host header, but I can't get FQDN working with SSL (it always defaults to NetBIOS name). Any thoughts on how to do both?

    Oh, and the fix for WSS 3.0 worked swimmingly!

    Reply
  2. Charlie Ruble

    Been working through this for two weeks now thinking it was an iis issue. Thanks for the posting on how to actually do it.

    Reply
  3. Max

    Hello! Great site! I've found a lot information here. I don't know how to thank you. I hope you'll be writing more and more.

    Thank you again. Bye.

    Reply
  4. Chris

    Thank You Mike Glaser!!!

    I've been having trouble setting up Forms Authentication with SSO for a couple of days now.

    The issue was that SSO via cookies requires the user to access the site via the FQDN even internally because the cookie is attached to the domain name, but the site was set up just for internal access.

    I should have guessed it was Alternate Access Mappings! The thing that was making it not obvious was that some types of access actually worked via the FQDN whilst I received "404 File Not Found" errors other times.

    Thanks Again!

    Reply
  5. Kale Ness

    I am able to change the Alternate Access Mapping of sharepoint to use the FQDN, but the "My Site" portion will then cease to open. I get an error message. If I float my cursor over the My Site link, I can read in the status bar that it is not looking for the FQDN--instead, it is still linking to the short-name. Any suggestions?

    Reply
  6. Kale,

    Check if your MySite isn't a seperate site on another port / ip-address / host header. If so, you have to add an additonal Alternate Access Mapping for the MySite.

    If not, I will digg in to this later.

    Reply
  7. Garry Chapple

    Great post, I been dickin around with WSS 3 all afternoon trying to configure internet access. Went through the usual thing of IIS settings/permissions, host header settings etc, but this fixed my problem in two minutes.

    Thanks man!

    Reply
  8. Roma

    Using this mode the office files from libraries prompt the user for a second time login everytime a file needs to be opened. This is quite annoying to the users. Is there a fix for that??

    Reply
  9. Mike Glaser

    Roma,

    This is a known issue at Microsoft. Please take the time to carefully read support.microsoft.com. This post will also give you the ability to submit an online request to obtain the hotfix, or call PSS (there would be no charge for a hotfix).

    Reply
  10. subrata

    I have changed the AAM for default site. Also did the mapping accordingly in IIS advanced setting to apply host header. But when I access the site, it prompt for the loginId and password

    Reply
  11. Husain

    Mike,

    Great post, Thank you

    One question regarding single word name resolution to Host header name

    example: if a user types in "link" --> can this be resolved to a host header name like http://link.companyportal.com

    Appreciate your help

    Thank you
    Husain

    Reply
  12. Nick P

    Subrata - that happened to me as well. After I rebooted my web server, it worked however. Are you using Kerberos?

    Reply

Leave a Reply

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