What Is Autodiscover and Why Is It a Problem?
Autodiscover is the protocol Outlook and other mail clients use to automatically find and configure your Exchange or Microsoft 365 mailbox settings. When it works correctly, users never have to manually enter a server address — Outlook looks it up automatically.
The problem arises in two common scenarios. First, when a hosted Exchange provider (such as Rackspace Hosted Exchange) goes down or is decommissioned, Outlook continues querying their Autodiscover endpoint, causing repeated authentication prompts, failed connections, and lost productivity. Second, in hybrid or migration environments where both a self-hosted Exchange server and Microsoft 365 exist, Outlook can get confused about which service to use — often picking the wrong one.
Disabling or redirecting Autodiscover tells Outlook to stop querying the old or conflicting endpoint and use the configuration you specify instead.
In December 2022, Rackspace's Hosted Exchange environment was taken offline by a ransomware attack. Businesses across Australia found Outlook repeatedly prompting for credentials and failing to connect — because Autodiscover was still pointing at Rackspace's dead infrastructure. Disabling Autodiscover lookups for the Rackspace endpoint was a critical first step in the recovery.
How Autodiscover Works (and Where It Can Go Wrong)
When Outlook starts, it runs through a lookup sequence to find your Exchange server. It checks these locations in order until one responds:
- The root domain —
https://yourdomain.com/Autodiscover/Autodiscover.xml - The Autodiscover subdomain —
https://autodiscover.yourdomain.com/Autodiscover/Autodiscover.xml - A DNS SRV record —
_autodiscover._tcp.yourdomain.com - The Microsoft 365 cloud —
https://autodiscover-s.outlook.com/Autodiscover/Autodiscover.xml - A local XML file on the device (if configured)
In a pure Microsoft 365 environment this sequence works perfectly. In a self-hosted Exchange environment, or when migrating between providers, step 1 or 2 may point to a server that is offline, decommissioned, or misconfigured — causing Outlook to stall at that step and never successfully connect.
Method 1 — Registry Edits (Single Machine)
The fastest way to fix Autodiscover issues on a single machine is to add exclusion keys to the Windows registry. These keys tell Outlook to skip specific lookup steps in its Autodiscover sequence.
Open Registry Editor (regedit) as Administrator and navigate to:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscoverIf the AutoDiscover key does not exist, right-click Outlookand create it. Then add the following DWORD (32-bit) values, each set to 1:
| Registry Value | What It Disables |
|---|---|
ExcludeLastKnownGoodUrl | Stops Outlook reusing the last successful Autodiscover URL (prevents reconnecting to an offline server) |
ExcludeHttpRedirect | Disables HTTP redirect lookups — prevents following redirects from a decommissioned endpoint |
ExcludeHttpsRootDomain | Skips the root domain check (https://yourdomain.com/Autodiscover/) |
ExcludeHttpsAutodiscoverDomain | Skips the autodiscover subdomain check (https://autodiscover.yourdomain.com/) |
ExcludeHttpsSPN | Disables SPN-based lookups used in on-premises Exchange environments |
ExcludeScpLookup | Disables Active Directory Service Connection Point lookups (relevant in domain-joined environments) |
You can also apply these via PowerShell (run as Administrator):
$path = "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover"
if (-not (Test-Path $path)) { New-Item -Path $path -Force }
$keys = @(
"ExcludeLastKnownGoodUrl",
"ExcludeHttpRedirect",
"ExcludeHttpsRootDomain",
"ExcludeHttpsAutodiscoverDomain",
"ExcludeHttpsSPN",
"ExcludeScpLookup"
)
foreach ($key in $keys) {
Set-ItemProperty -Path $path -Name $key -Value 1 -Type DWord
}
Write-Host "Autodiscover exclusions applied."Registry changes do not take effect until Outlook is fully closed and restarted. Use Task Manager to confirm
OUTLOOK.EXE is not still running in the background before reopening it.Method 2 — Group Policy (Domain-Wide Deployment)
If you manage multiple machines in a Windows domain, Group Policy is the right way to push these settings across all devices simultaneously. Microsoft provides official ADMX templates for Office/Outlook that include Autodiscover controls.
- Download the Microsoft 365 Apps ADMX templates from Microsoft's Download Center and copy the
.admxand.admlfiles to your Group Policy Central Store - Open Group Policy Management Console and create or edit a GPO targeting the affected computers or users
- Navigate to: User Configuration → Policies → Administrative Templates → Microsoft Outlook 2016 → Account Settings → Exchange → Autodiscover
- Enable "Exclude the root domain from Autodiscover"
- Enable "Exclude the SCP object from Autodiscover" (for on-premises domain environments)
- Enable "Exclude the HTTPS autodiscover domain"
- Link the GPO and run
gpupdate /forceon a test machine to verify
The ADMX path above is for Outlook 2016, 2019, and Microsoft 365 Apps (they share the same 16.0 registry hive). For older versions use the corresponding path —
Outlook 2013 uses the 15.0 hive,Outlook 2010 uses 14.0.Method 3 — DNS Changes
If Autodiscover is failing because the DNS record points to a decommissioned server, fixing the DNS record is often the cleanest long-term solution — especially when transitioning fully to Microsoft 365. If you're unsure how domains and DNS records work, that guide explains the relationship between your domain name, DNS zone, and email configuration.
| Scenario | DNS Action |
|---|---|
| Moving fully to Microsoft 365 | Create a CNAME: autodiscover.yourdomain.com → autodiscover.outlook.com |
| Staying on self-hosted Exchange | Point the CNAME or A record to your own Exchange server's IP or hostname |
| Decommissioning old hosted provider (e.g. Rackspace) | Delete the old CNAME pointing to the provider and replace with the M365 or self-hosted target |
| SRV record approach | Add _autodiscover._tcp.yourdomain.com SRV 0 0 443 autodiscover.outlook.com |
DNS changes propagate based on the TTL of the existing record — if the record had a TTL of 3600 seconds (1 hour), it may take up to that long for all clients to see the new value. Reduce the TTL to 300 (5 minutes) before making changes if you need faster propagation.
After making DNS changes, use
nslookup autodiscover.yourdomain.comfrom an affected machine to confirm it is resolving to the new target. Keep the registry exclusions in place until DNS has propagated everywhere.Method 4 — Suppress Autodiscover Redirect in Microsoft 365 Admin Centre
If your domain is registered in Microsoft 365 and Outlook is being redirected to Microsoft 365 when you want to use self-hosted Exchange, you can suppress the M365 Autodiscover redirect using PowerShell connected to Exchange Online:
# Connect to Exchange Online
Connect-ExchangeOnline
# Check current Autodiscover redirect setting
Get-OrganizationRelationship | Select-Object Name, AutodiscoverServiceInternalUri
# Suppress the Autodiscover redirect for your domain
Set-OrganizationConfig -AutodiscoverServiceInternalUri $nullFor hybrid environments where you want Exchange Online to hand off to your on-premises server rather than handling Autodiscover itself:
# Point Exchange Online Autodiscover to your on-premises server
Set-OrganizationConfig -AutodiscoverServiceInternalUri "https://mail.yourdomain.com/Autodiscover/Autodiscover.xml"Method 5 — Force a Local Autodiscover XML File
For situations where you need precise control over Outlook's configuration on specific machines — without relying on DNS or registry exclusions — you can force Outlook to use a local XML file containing your Exchange settings.
Create a file named Autodiscover.xml with your Exchange server's settings:
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>EXCH</Type>
<Server>mail.yourdomain.com</Server>
<SSL>On</SSL>
<LoginName/>
</Protocol>
</Account>
</Response>
</Autodiscover>Then add the following registry key to point Outlook to this file:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover
Value: PreferLocalXML = 1 (DWORD)
Value: [your email domain] = C:\path\to\Autodiscover.xml (String)Verifying Autodiscover Is Working Correctly
After making changes, use the built-in Outlook diagnostic to confirm Autodiscover is resolving to the right server:
- Hold Ctrl and right-click the Outlook icon in the system tray
- Select "Test Email AutoConfiguration..."
- Enter the affected email address and click Test
- Check the Results tab — confirm the server addresses shown match your self-hosted Exchange or M365 settings
- Check the Log tab to see exactly which Autodiscover steps were attempted and which succeeded
You can also test from the command line:
# Test Autodiscover DNS resolution
nslookup autodiscover.yourdomain.com
# Test Autodiscover endpoint reachability (PowerShell)
Invoke-WebRequest -Uri "https://autodiscover.yourdomain.com/Autodiscover/Autodiscover.xml" -UseBasicParsing
# Test via Exchange Online remote connectivity (browser)
# https://testconnectivity.microsoft.com → Outlook AutodiscoverCommon Issues and Fixes
| Symptom | Likely Cause | Fix |
|---|---|---|
| Outlook keeps prompting for credentials | Autodiscover pointing to an offline or wrong server | Apply ExcludeLastKnownGoodUrl registry key and fix DNS |
| Outlook connects to M365 instead of self-hosted Exchange | Autodiscover CNAME pointing to autodiscover.outlook.com | Update CNAME to point to your Exchange server, or use local XML override |
| Registry exclusions not taking effect | Outlook not fully closed, or GPO overriding local registry | Kill OUTLOOK.EXE via Task Manager; check for conflicting GPO |
| Autodiscover test shows old Rackspace server | DNS record still points to Rackspace infrastructure | Delete/replace Autodiscover CNAME at your DNS host (Cloudflare, etc.) |
| Some machines fixed, others still broken | DNS TTL still propagating, or per-user registry vs HKLM conflict | Wait for TTL to expire; check if setting is in HKCU vs HKLM |
| Mobile clients still connecting to old server | Mobile apps use their own Autodiscover discovery, bypassing Windows registry | Fix DNS — mobile clients rely entirely on DNS-based Autodiscover |
Quick Reference: All Commands
# ── REGISTRY (PowerShell, run as current user) ──────────────
$path = "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover"
if (-not (Test-Path $path)) { New-Item -Path $path -Force }
"ExcludeLastKnownGoodUrl","ExcludeHttpRedirect","ExcludeHttpsRootDomain",
"ExcludeHttpsAutodiscoverDomain","ExcludeHttpsSPN","ExcludeScpLookup" |
ForEach-Object { Set-ItemProperty -Path $path -Name $_ -Value 1 -Type DWord }
# ── VERIFY DNS ───────────────────────────────────────────────
nslookup autodiscover.yourdomain.com
# ── TEST AUTODISCOVER ENDPOINT ───────────────────────────────
Invoke-WebRequest "https://autodiscover.yourdomain.com/Autodiscover/Autodiscover.xml" -UseBasicParsing
# ── EXCHANGE ONLINE (suppress M365 redirect) ─────────────────
Connect-ExchangeOnline
Set-OrganizationConfig -AutodiscoverServiceInternalUri $null
# ── CHECK CURRENT EXCHANGE ONLINE AUTODISCOVER CONFIG ────────
Get-ClientAccessService | Select-Object Name, AutodiscoverServiceInternalUriNeed Help Migrating Away from a Hosted Exchange Provider?
Autodiscover issues are rarely just an Outlook setting — they're usually a symptom of a broader migration or hybrid configuration that needs proper planning. Whether you're moving off Rackspace, transitioning a self-hosted Exchange environment to Microsoft 365, or troubleshooting a hybrid setup that's misbehaving, getting the DNS, Exchange, and client configuration aligned requires knowing what to change and in what order.
Melbits manages Microsoft 365 and Exchange migrations for Melbourne businesses across legal, accounting, medical, and professional services. We're a Microsoft Partner experienced in Exchange Online, hybrid configurations, and full M365 migrations for teams of 10–150 staff.