I've received a lot of comments about this blog post I wrote outlining how to use WSS v3 and MOSS 2007 with external URLs. Since I wrote that SharePoint v3/2007 has gone RTM and I've learned a few more things about how Alternate Access Mappings work. Seemed like a time for an update.

First, a recap. WSS v3 handles incoming requests a little differently than WSS v2 did. Seasoned SharePoint administrators had a little trouble getting v3 to work with Internet URLs, like http://www.toddklindt.com, even after creating the correct DNS entries and forwarding the correct ports. Users that hit the external URL would get redirected to the hostname of the WSS server, in my case http://matrix. No amount of swearing or gnashing or teeth would convince SharePoint to cooperate.

The v2/2003 versions of SharePoint didn't handle being behind reverse proxies very well out of the box. The methods that it used to generate URLs weren't very compatible with the reworking of URLs that reverse proxies do. Support for this was added in SharePoint v3/2007 and it gives administrators a lot of flexibility. Unfortunately it adds some complexity as well. The key to bending SharePoint to your will is Zones and Alternate Access Mappings. A picture is worth a thousand words. Here's how the settings look before you change them.

You can see there is a single entry that has matching Public and Internal URLs. Public URLs are the URLs that users use to access your site. The Public URL for this site is http://www.toddklindt.com for Internet users. The Internal URL will only be different if there is something between the user and the SharePoint server like a reverse proxy. In our case there's not, so when we create our Alternate Access Mapping (AAM) both URLs will be the same. Click "Edit Public URLs." In the box below Internet type the URL that you want your users to use when they access your site.

In this screenshot the machinename is MVP, but the URL I want Internet users to use is http://www.mvpbook.com. Hit Save and your AAM settings should look like this:

Now internal users can hit your site at http://mvp and Internet users can hit it at http://www.mvpbook.com. If you prefer to make these changes via the command line use the following command:

If you have other URLs that you'd like to use, you can add them to the other Zones. The only address that must be defined is the Default. That's the URL that is used in quotas and other administrative purposes.

Later I'll cover Zones more and how they work with Alternate Access Mappings and user authentication.