Exchange 2010 AutoDiscover for Multi-Tenant

This blog post will explain a solution to prevent the need to use a massive SAN (Subject Alternate Name) SSL certificate for all your tenant domain names. Exchange 2010 can be setup for Multi-Tennant easily by using only a much smaller and cheaper SSL certificate for both the Exchange RPC proxy endpoint and autodiscover DNS names. The RPC proxy endpoint normally stays the same no matter how many domains/tenants you are hosting for and is generally

Bit of background, in Exchange 2010, all Outlook clients will normally use MAPI/RPC or Outlook Anywhere (RPC over HTTPS) to connect to a Client Access Server. The MAPI/RPC clients (normally LAN and internal clients) connect to the non-externally resolvable CAS Array Object FQDN (aka RPC endpoint) for Mailbox access and the external/remote HTTPS based clients connect to Outlook Anywhere hostname (aka RPC proxy endpoint) for all Mailbox and Public Folder access. Generally the RPC endpoint is an internally resolvable DNS name only e.g. and the RPC proxy endpoint can be both, an internal and external resolvable DNS name e.g.

As for autodiscover, when you setup mail for the first time, or each time you re-open your mail client, autodiscover is always working automatically in the background without the user knowing. If setting up their mail for the first time, all the user has to do is enter their email address/username and password, upon clicking next, autodiscover will work its magic and grab the exchange server name, connection settings, free/busy and other important URLs needed for the client to have a successful connection experience.

For autodiscover, there is a certain order to the way a client checks this. For example, take a user which has an email address of Autodiscover would take the domain name section of this email address only (, then run some checks for autodiscover in the following order stopping at the first one that is successful:

  1. Attempting to test potential Autodiscover
  2. Attempting to test potential Autodiscover
  3. Attempting to contact the Autodiscover service using the HTTP redirect method
  4. Attempting to contact the Autodiscover service using the DNS SRV redirect method

If all methods fail, then autodiscover fails. As you can see above, the first two connections are HTTPS connections and are the only true methods for autodiscover, the 4th method is used primarily for internal use. The 3rd method is an HTTP redirect, which simply redirects autodiscover requests, normally to an HTTPS URL. As HTTPS is used, there needs to be an SSL certificate with a SAN of the autodiscover URL e.g. ( It’s not possible in a multi-tenant environment to have a single SAN certificate to cover all the many different domains which you host.

Let’s say you run a multi-tenant environment and you have the following domains:

  1. Choose a master domain in which to host your HTTPS autodiscover DNS name (e.g., use a DNS name in this domain which will be listed on your SSL certificate and will be the DNS name in which all your tenants point to for their autodiscover CNAME record. For example, use
  2. Dedicate an IIS server used for the HTTP redirection method (Step 3 above). Setup a DNS A record (hostname) which points to the IP address of this IIS server. Open port 80 inbound only as we are only using HTTP for the redirection.
  3. Get your tenants (for each one of your hosted Exchange domains) to create a DNS CNAME record. For example, for tenant, they would create a DNS CNAME record which points to
  4. The DNS name would point to a dedicated HTTP redirection IIS server
  5. The HTTP redirect IIS server would through a redirect (HTTP 301/302) response with a redirect URL of

The diagram below includes the steps in order:


HTTP Redirect IIS server setup

  1. Install IIS on a Windows server of your choice, ensure you choose HTTP Redirection


  2. Create a folder C:\inetpub\wwwroot\autodiscover add a blank file called autodiscover.xml


  3. Create a new virtual directory called ‘autodiscover’. Select this new virtual directory > click on Content View > Right click on autodiscover.xml > Select ‘Switch to Features View’


  4. Double click on HTTP Redirect


  5. Change the HTTP Redirect settings to reflect the screenshot below.


  6. Right click on Default Web Site > click on Edit Bindings


  7. Add in all your Tenant domains as HTTP bindings.


Outlook clients might get a pop up like this, Allow this website to configure <alias>@<domain> server settings?. In this message, click to select the Don’t ask me about this website again check box, and then click Allow.


One Comment

  1. Sergey

    I found that you need to allow “Directory Browsing” on the site to make it properly work. Otherwise Exchange Connectivity Analyzer returns an error. Same for the outlook as well.

Leave a Reply to Sergey Cancel reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s