Forum Discussion

AliBidaran's avatar
AliBidaran
Copper Contributor
Sep 14, 2024

Microsoft office outlook cannot connect to onprem exchange server

Hi,

In my company, we are using on-prem Exchange 2019 for the mail server and we published our main website on the same domain as the primary email address. For instance, mailto:email address removed for privacy reasons is our email address format and our website address is example.com. Everything was working fine until we developed our website, after that from the internet whenever I tried to add an account to Microsoft Office Outlook I kept receiving "Something went wrong and Outlook couldn't set up your account". After so much effort and searching I've found out the reason is that Outlook sends a query to example.com which is my primary domain and the new website sends some response that causes the error and when I removed the DNS record from the internet everything went back to normal.
Now I do not know how to resolve this issue so I can have my website while outlook works correctly.

Please help me

1 Reply

  • 1. Basic troubleshooting steps
    Test the base connection:
    cmd
    ping exchange.yourdomain.com
    Check the necessary ports:
    cmd
    telnet exchange.yourdomain.com 443
    (If the Telnet client is not installed, you can test it via PowerShell: Test-NetConnection exchange.yourdomain.com -Port 443)
    2. Client configuration repair
     Rebuild the Outlook configuration file:
    Close Outlook.
    Run:
    cmd
    outlook.exe /profiles newprofile /autodiscover
    Certificate trust settings:
    Access the Exchange OWA address (e.g. https://exchange.yourdomain.com/owa)
    Export the certificate (.cer format) in your browser
    Double-click on the certificate → Install to “Trusted Root Certificate Authority”
    3. Server-side check
     Exchange service status:
    powershell
    # Check key services
    Get-Service MSExchange* | Where Status -ne Running
    # Verify MAPI over HTTP
    Get-MapiVirtualDirectory | Select Server,InternalUrl,ExternalUrl
     Autodiscover test:
    powershell
    Test-OutlookConnectivity -RunFromClientAccessServer -ProbeIdentity OutlookMapiHttp.
    4. Special handling of corporate environments
     Group policy tuning:
    Ensure that the following policies are enabled:
    Computer Configuration → Administrative Templates → Microsoft Outlook 2016 → Account Settings → Exchange
    “Enable MAPI over HTTP”
    “Use online mode”

Resources