Fix it now
HTTP 404.0 is published as “the file that you try to access is moved or doesn’t exist”, so IIS looked for the Autodiscover endpoint and did not find it. Outlook cannot configure itself without Autodiscover, so new profiles will not build, the offline address book never arrives and free/busy stops. Work the lookup chain in the order the client uses it.
Get-ClientAccessService | Format-List Name,AutoDiscoverServiceInternalUri
Get-AutodiscoverVirtualDirectory | Format-List Server,Name,InternalUrl,ExternalUrl
Test-OutlookWebServices
iisreset /noforce
- Read the service connection point first. A domain-joined Outlook looks there before anything else, and a URI naming a decommissioned server explains the whole symptom.
- Confirm the virtual directory still exists, in the shell and in IIS Manager. If it is absent from either, that is your answer.
- From a browser on the server, request the Autodiscover XML path over HTTPS. A credential prompt followed by an XML error response means the endpoint is alive; a 404 page means it is not.
- If the directory is missing or broken, recreate it:
Remove-AutodiscoverVirtualDirectorythenNew-AutodiscoverVirtualDirectory -WebSiteName "Default Web Site" -WSSecurityAuthentication:$True, theniisreset /noforce. - Set the service connection point to a name your certificate covers:
Set-ClientAccessService -Identity EX01 -AutoDiscoverServiceInternalUri https://mail.contoso.com/Autodiscover/Autodiscover.xml, on every Exchange server.
If you are getting 405 rather than 404, stop and read the 405 section below. Microsoft documents a specific IIS cause for it on this endpoint that has nothing to do with the URL being wrong.
If clients configure again, stop here. If not, the next section walks the lookup order so you can tell which step is failing.
Why it happens
Microsoft documents the order an Exchange Web Services client generates Autodiscover endpoints in, and it is worth knowing because each step fails differently. Service connection point objects in Active Directory come first, both the pointer and the URL forms, and they return site-specific endpoints. Then the URLs derived from the email address: the root domain, then the autodiscover subdomain. Then DNS records – a CNAME for the autodiscover name, or an SRV record at _autodiscover._tcp. Finally an HTTP redirect, which is how organisations with several SMTP namespaces point clients at one place.
A domain-joined client on the internal network normally never gets past the first step, which is why an internal-only failure so often turns out to be a service connection point naming a server that was decommissioned two years ago. A client outside the network never uses the first step at all, which is why internal and external clients can behave completely differently for the same mailbox.
The Autodiscover service itself runs as a virtual directory named autodiscover under the default website in IIS, in the front end Client Access services on Mailbox servers. So there are three separate things that can produce a 404: the pointer, the directory, and the content the directory serves. IIS’s published description of 404.0 covers all three without distinguishing them, which is why you have to test the chain rather than the endpoint.
The neighbouring substatus codes are more specific and are worth reading properly. 403.4 is SSL required: the request came over a non-secure channel and the application requires SSL. 401.3 is unauthorized due to the ACL on the resource, which Microsoft describes as a problem in NTFS file system permissions – it can occur even when the permissions on the file you are looking at seem right. And 405.0 is method not allowed, which on this endpoint has a documented Exchange-specific cause.
The service connection point points at something that no longer exists
You have this one if Internal clients fail while external ones work, and the AutoDiscoverServiceInternalUri names a server or a name nobody recognises.
- Read the current value on every Exchange server:
Get-ClientAccessService | Format-List Name,AutoDiscoverServiceInternalUri. - Set it to a name the certificate covers:
Set-ClientAccessService -Identity EX01 -AutoDiscoverServiceInternalUri https://mail.contoso.com/Autodiscover/Autodiscover.xml. - Do it for every server, because a client may read any of the published objects.
- Allow for directory replication before retesting on a client.
The virtual directory or its IIS application is missing
You have this one if 404.0 even when the path is requested on the server console, and the directory is absent from the cmdlet output or from IIS Manager.
- Check both places:
Get-AutodiscoverVirtualDirectoryin the shell, and the application list under the sites in IIS Manager. - Recreate it:
Remove-AutodiscoverVirtualDirectory "EX01\Autodiscover (Default Web Site)"thenNew-AutodiscoverVirtualDirectory -WebSiteName "Default Web Site" -WSSecurityAuthentication:$True. - Remember the front end and back end copies are separate objects and are recreated separately.
- Run
iisreset /noforceand request the path again from the console.
The svc handler mapping is missing, and you are getting 405
You have this one if 405 Method Not Allowed rather than 404, and the IIS log shows 405 for POST requests to /autodiscover/autodiscover.svc or /EWS/mrsproxy.svc.
- This is a documented IIS condition: the svc-Integrated handler mapping is missing, so IIS will not process requests to .svc endpoints.
- From a Command Prompt, change to
C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundationand runServiceModelReg.exe -r, then restart IIS. - If the mapping exists at server level, open Handler Mappings on the Autodiscover virtual directory in IIS Manager, revert to the parent configuration, and confirm svc-Integrated appears.
- Then reset the directory:
Remove-AutodiscoverVirtualDirectoryandNew-AutodiscoverVirtualDirectory -WebSiteName "Default Web Site" -WSSecurityAuthentication:$True, followed byiisreset /noforce.
The same missing mapping breaks the mailbox replication proxy endpoint, so a hybrid migration failing at the same time as Autodiscover is a strong hint that this is what you are looking at.
SSL settings or bindings on the site are wrong
You have this one if 403.4 rather than 404.0, or the site answers on HTTP and refuses on HTTPS.
- In IIS Manager, confirm the Default Web Site has an HTTPS binding with a certificate assigned.
- Confirm the certificate is enabled for IIS:
Get-ExchangeCertificate | Format-List Subject,CertificateDomains,Services. - Check the SSL settings on the Autodiscover application match what Exchange expects rather than what a hardening script left behind.
- Restart IIS and retest from the console before testing from a client.
The path is not published to external clients
You have this one if Internal clients configure normally and remote ones do not, and the external name resolves to a proxy or firewall.
- Confirm public DNS has a record for the autodiscover name pointing at your published address, or an SRV record at
_autodiscover._tcp. - Confirm the reverse proxy publishes the Autodiscover path, not only the mail path, and passes POST through unchanged.
- Confirm the public certificate covers the autodiscover name and that the whole chain is served.
- Test from outside the network with Microsoft’s Remote Connectivity Analyzer rather than from a machine on the LAN.
Full reference
The lookup order, and what breaks at each step
| Step | What the client does | What a failure here looks like |
|---|---|---|
| 1. Service connection point | Reads the SCP pointer and URL objects from Active Directory | Domain-joined clients fail, external clients are fine |
| 2. Root domain | Tries the Autodiscover path under the email address’s domain | Usually fails by design; not a fault on its own |
| 3. Autodiscover subdomain | Tries the Autodiscover path under autodiscover.<domain> |
External clients fail; the DNS record or the publishing is missing |
| 4. DNS records | A CNAME for the autodiscover name, or an SRV record at _autodiscover._tcp |
External clients fail after a DNS change |
| 5. HTTP redirect | Follows a redirect to the Autodiscover endpoint for another namespace | Fails where several SMTP namespaces share one endpoint |
Reading the substatus rather than the status
| Code | Published meaning |
|---|---|
404.0 |
Not found: the file that you try to access is moved or does not exist |
403.4 |
SSL required: the request is made over a non-secure channel, but the application requires SSL |
401.3 |
Unauthorized due to ACL on resource: a problem in the NTFS file system permissions |
405.0 |
Method not allowed: the request uses an HTTP method that is not valid |
401.3 is the one that misleads people, because Microsoft’s own description warns that it can occur even when the permissions on the file you are inspecting look correct – the classic example being an account without access to a directory further up the tree. Compare against a healthy server rather than reasoning about what the permissions ought to be.
The Exchange cmdlets involved
| Cmdlet | What it configures |
|---|---|
Get-ClientAccessService / Set-ClientAccessService |
The service connection point object, through AutoDiscoverServiceInternalUri |
Get-AutodiscoverVirtualDirectory |
The Autodiscover virtual directory, front end and back end |
Remove-AutodiscoverVirtualDirectory / New-AutodiscoverVirtualDirectory |
Recreating it when it is missing or broken |
Get-WebServicesVirtualDirectory / Set-WebServicesVirtualDirectory |
The EWS URLs Autodiscover hands out |
Get-OabVirtualDirectory / Set-OabVirtualDirectory |
The offline address book URLs Autodiscover hands out |
Test-OutlookWebServices |
Verifies that the Outlook provider is configured correctly for a given address |
Testing from the right place
- From the server console, request the Autodiscover XML path over HTTPS. A credential prompt followed by an XML error body means the endpoint is alive and the fault is elsewhere in the chain.
- From a domain-joined client,
Test-OutlookWebServicesand Outlook’s own autoconfiguration test both exercise the chain the client actually uses. - From outside the network, Microsoft’s Remote Connectivity Analyzer is the only honest test. A laptop on the office wi-fi is still an internal client.
- After any change, test from a client that was failing rather than one that was working, and close and reopen Outlook first because it caches its configuration.
Outlook has client-side settings that switch individual Autodiscover lookup steps off. They are occasionally useful for proving which step fails, but they are overrides rather than fixes and they hide the problem on the machine you are testing from. If you use one, take it off again as soon as you have your answer.
When Autodiscover works and Outlook still will not configure
- Check the URLs Autodiscover is handing out, not just that it answers. A working Autodiscover that returns an EWS or OAB URL nobody can reach produces a different set of complaints.
- Check the certificate covers every name in the response, including the autodiscover name, and that the chain is complete.
- Check the mailbox is on a database whose server is healthy; Autodiscover is happy to describe a server that is not answering.
- Check whether a group policy or an Office deployment setting is forcing a configuration that overrides what Autodiscover returns.
- Check for a proxy on the client that is intercepting the request before it reaches the server at all.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
HTTP 404.0 |
Not found: the file that you try to access is moved or does not exist | Microsoft Learn |
HTTP 403.4 |
SSL required: the request was made over a non-secure channel but the application requires SSL | Microsoft Learn |
HTTP 401.3 |
Unauthorized due to ACL on resource: a problem in the NTFS file system permissions, which can occur even where the file’s own permissions look correct | Microsoft Learn |
HTTP 405 |
Method not allowed: the request uses an HTTP method that is not valid. On Autodiscover.svc and mrsproxy.svc, Microsoft documents a missing svc-Integrated handler mapping as the cause | Microsoft Learn |
Confirm the fix worked
- Requesting the Autodiscover XML path from the server console returns a credential prompt and an XML response rather than a 404 page.
Get-ClientAccessService | Format-List Name,AutoDiscoverServiceInternalUrishows a name your certificate covers, on every server.Test-OutlookWebServicescompletes without an error.- A new Outlook profile builds on a domain-joined client and again on a client outside the network.
- The offline address book downloads and free/busy resolves, which are the two things that break quietly when Autodiscover is half working.
Questions people ask about this
Does fixing this cost anything?
No. Autodiscover is part of Exchange, the cmdlets ship with it, and DNS records cost nothing. The only spend that can appear is a public certificate that covers the autodiscover name, and that comes from a certificate authority.
Why do internal clients work and external ones not?
Because they use different steps. A domain-joined client reads the service connection point from Active Directory and usually never gets further; an external client starts at the DNS records. Fixing one has no effect on the other.
I am getting 405 rather than 404. Is that the same problem?
No. Microsoft documents a specific cause for 405 on the Autodiscover and mailbox replication proxy endpoints: the svc-Integrated handler mapping is missing in IIS. The fix is ServiceModelReg.exe -r, or reverting handler mappings to the parent and recreating the virtual directory.
Should I create an SRV record or a CNAME?
Either is a documented step in the lookup order. A CNAME for the autodiscover name is the simpler arrangement; an SRV record at _autodiscover._tcp is useful where you cannot get a certificate covering the autodiscover name. Do not create both pointing at different places.
Is recreating the Autodiscover virtual directory safe?
Yes, and it is what Microsoft’s own troubleshooting article does. Record the URLs first, use the WebSiteName and WSSecurityAuthentication parameters as documented, and run iisreset afterwards.
