Mike's Blog


Business Intelligence keeps me live and communicating!

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 systemroot\System32\Drivers\Etc 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.

 

Comments

Mike's Blog said:

This blog describes how you can setup your Team Foundation Server environment using a FQDN. For a full

# January 31, 2007 1:42 PM

aaron said:

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!

# February 2, 2007 11:16 AM

Charlie Ruble said:

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

# February 8, 2007 12:33 AM

Mike Glaser said:

Aaron,

I found the following blog on the net. http://blogs.msdn.com/karthick/archive/2006/12/12/wss-2-0-the-server-instance-specified-was-not-found-please-specify-the-server-s-address-and-port.aspx

It explains why FQDN doesn't work over SSL, but I doubt if this is the truth.

# February 8, 2007 12:44 AM

Mike's Blog said:

Since Brian Keller and Brian Harry requested me to test Configuring Visual Studio 2005 Team Foundation

# April 23, 2007 12:49 PM

Steve Daly said:

Excellent post!  I am new to MOSS 2007 and was wrestling with IIS host headers.  

# May 2, 2007 5:12 AM

Max said:

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.

# May 8, 2007 2:03 PM

Chris said:

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!

# May 22, 2007 8:19 PM

Joel Oleson's SharePoint Land said:

Just got off the phone with Sean Livingston and we had a quick discussion about host header upgrade and
# May 31, 2007 1:31 AM

Craig Viera said:

You saved me. Thanks

# September 28, 2007 1:43 PM

Kale Ness said:

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?

# November 6, 2007 9:15 PM

Mike Glaser said:

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.

# November 6, 2007 9:26 PM

Garry Chapple said:

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!

# December 31, 2007 12:01 PM

Mike's Blog said:

Lately I&#39;ve been asked to install Team System Web Access on the same machine containing WSS 3.0.

# March 11, 2008 9:50 PM

snowcounty said:

Here is a good article on how to host the sharepoint site on FQDN.

# April 13, 2008 8:22 PM

Roma said:

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??

# August 9, 2008 4:37 PM

Mike Glaser said:

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).

# August 12, 2008 2:33 PM

Jesse said:

i need cookies or im not accessing the site via its  fully qualified domain name

# October 1, 2008 12:14 AM

subrata said:

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

# November 25, 2008 7:40 PM

Russell said:

Thanks for this, it just saved my day.

# March 15, 2009 3:34 PM

Husain said:

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

# July 28, 2009 6:01 PM

Nick P said:

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

# January 5, 2010 12:09 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 3 and 2 and type the answer here: