Generally the Exchange external Autodiscover DNS entity is configured as a regular A record. Sometimes a service record (SRV) is used instead. Since I have the habit of forgetting the syntax of quickly querying for the SRV record, this is one of those shared bookmark posts!
Nslookup is the tool of choice here! Its documentation can be found on TechNet.
There are two ways to run nslookup – interactive and noninteractive. Noninteractive is good when you know that you only want to query a single piece of data. Let’s take a peek at an example of each. We will check for the _autodiscover SRV record in the Tailspintoys.ca domain. The record points to a host called autod.tailspintoys.ca. The full format of this record is:
_autodiscover._tcp.tailspintoys.ca
For more reading on SRV records, take a peek at this article. And for Autodiscover in general please review this post.
Nslookup – Noninteractive
Open a cmd prompt and run
nslookup -q=srv _autodiscover._tcp.tailspintoys.ca
You should see the below output. Note that the svr hostname will be the Autodiscover target.
In this example we launched Nslookup in noninteractive mode. The query type is set to SRV and then we checked for the _autodiscover._tcp.tailspintoys.ca record.
Nslookup - Interactive
Open a cmd prompt and run:
-
nslookup
-
set q=srv
-
_autodiscover._tcp.tailspintoys.ca
In this example we launched Nslookup in interactive mode, so we can interact with it. The query type is set to SRV and then we checked for the _autodiscover._tcp.tailspintoys.ca record.
Reference – Autodiscover Exchange SRV Record Configuration
For reference purposes, the steps to add an Autodiscover SRV record will be something like the below. They are intended to be general so please follow any specific notes or items for the DNS registrar you are using!
In your DNS zone editor add a SRV record with the following information:
-
Service
_autodiscover
-
Protocol
_tcp
-
Name Enter one of the following values:
-
Enter
@
if your registered domain is your cloud-based domain. For example, if your registered domain is contoso.com and your cloud-based domain is contoso.com, enter@
. -
Enter the subdomain name if your cloud-based domain is a subdomain of your registered domain. For example, if your registered domain is contoso.com, but your cloud-based domain is the subdomain test.contoso.com, enter
test
.
-
-
Priority
10 (or as per your design)
-
Weight 10 (or as per your design)
-
Port
443
-
Target
server.contoso.com (in the example above this was autod.tailspintoys.ca)
-
TTL Verify that an appropriate TTL is selected, 1 hour is a common default. (If you are approaching a migration, this should be decremented to allow for quicker cutover)
In addition to the SRV record pointing us to the correct location, we also have to ensure that there is a valid certificate installed which is published to the Internet. This could be something as simple as a NAT rule with the appropriate firewall rule for TCP 443 or it could involve TMG or a load balancer's APM.
The choice as they say - is yours!!
Cheers,
Rhoderick
Nice, one line and all I have to remember is -q=srv, thanks!
Thanks
Sometimes its good to know what you are doing, I have ran interactive and non-interactive queries depending on whether I wanted to lookup just 1 record or multiple ones. now I know they have a name for it
In the Exchange 2003 world and below, those administrators looking to automate and control the behaviour
Being able to retrieve DNS TXT records is very useful in multiple scenarios. In this post we will look
This article is tagged O365 but the instructions for creating the DNS SRV record do not seem to be compatible or applicable to O365.
I just ran the provided nslookup command substituting my domain name and it was unable to resolve. I ran Outlook autodiscover test from the same PC, and SRV lookup succeeded. I would love to have something like this to test against when autodiscover to O365
fails, but it seems the test does not apply either.
It will work for O365 Michael – the domain you see above is one of my test tenants.
What DNS server did you target ?
Cheers,
Rhoderick
The year 2015 is almost done, and 2016 is upon us! As in previous years , I thought it would be interesting
I think the right query is like this:
nslookup
set type=srv
_autodiscover._tcp.tailspintoys.ca
SET TYPE= not SET Q=
Am I right?
You can use either Fernando,
From the help content:
type=X – set query type (ex. A,AAAA,A+AAAA,ANY,CNAME,MX,NS,PTR,SOA,SRV)
querytype=X – same as type
Cheers,
Rhoderick
recently migrated the exchange but i don’t find the autodiscover xml file. how to publish the autodiscover file. And is it necessary to publish the autodiscovery file?
Yes – I do expect Autodisocver to be correctly published. Follow the steps in the Exchange Deployment Assistant, and then verify with the remote connectivity analyser exrca.com
Cheers,
Rhoderick