How to Fix ‘The Name on the Security Certificate Is Invalid or Does Not Match’ in Outlook

Launching Microsoft Outlook or synchronising incoming and outgoing email folders can frequently trigger an intrusive security warning box alerting: ‘The server you are connected to is using a security certificate that cannot be verified. The name on the security certificate is invalid or does not match the name of the site.’ The dialogue prompts users with a query: ‘Do you want to continue using this server?’ While clicking ‘Yes’ temporarily allows email retrieval for the current session, the warning recurs every time Outlook polls the mail server, disrupting workflow and signalling a secure Transport Layer Security (TLS/SSL) mismatch.

What Triggers the Certificate Name Mismatch Warning in Outlook?

When Outlook establishes an encrypted connection via IMAP (port 993), POP3 (port 995), or SMTP (port 465/587), it audits the remote server’s SSL certificate against the exact server hostname configured in your account settings:

  • Mail Server Domain Name Mismatch: Using a custom domain hostname (such as mail.yourcompany.com) in Outlook account settings while the hosting provider’s shared mail server presents a wildcard certificate bound to its parent cluster (such as *.webhostingserver.com).
  • Shared Web Hosting SSL Defaults: In multi-tenant cPanel or Plesk environments, web hosts frequently bind secure mail services to the server’s primary fully qualified domain name (FQDN) rather than customer-specific domains.
  • Autodiscover Caching Old Server Records: Outlook’s internal Autodiscover cache holding stale DNS records pointing to a previous mail provider following a domain migration.
  • Corrupted Local Windows Certificate Store: Outdated or missing intermediate Certificate Authority (CA) root certificates in the Windows trust store.
  • Antivirus SSL Mail Scanning: Endpoint security suites intercepting encrypted email ports and substituting their own self-signed inspection certificates.

Step 1: Inspect the Security Certificate in Outlook

Determining the exact domain name issued on the server’s SSL certificate reveals the correct hostname to enter in Outlook.

  1. When the security alert pop-up appears in Outlook, click the View Certificate… button.
  2. In the Certificate details window, locate the field labelled Issued to:.
  3. Take note of the exact server hostname displayed (for instance, server105.hostingprovider.com or mail.hostedplatform.net).
  4. Switch to the Details tab and inspect the Subject Alternative Name (SAN) field to see all domain aliases authorised by this certificate.
  5. Click OK to close the certificate viewer.

Step 2: Update Server Hostnames in Outlook Account Settings

Aligning your incoming and outgoing server names with the certificate’s ‘Issued to’ domain resolves the mismatch permanently.

  1. In Outlook, click File in the top-left corner.
  2. Select Account Settings > Server Settings (or Account Settings > Account Settings, select your email account, and click Change).
  3. Under the Incoming mail section:
    • Change the Server field from your custom domain (e.g. mail.yourdomain.com) to the exact verified hostname discovered in Step 1 (e.g. server105.hostingprovider.com).
    • Verify that the port is set correctly (e.g. 993 for IMAP with SSL/TLS).
  4. Under the Outgoing mail (SMTP) section:
    • Update the Server hostname to match the same verified host domain.
    • Set the port to 465 (SSL/TLS) or 587 (STARTTLS).
  5. Click Next or Done to save settings. Outlook will perform a connection test without prompting any certificate warnings.

Step 3: Flush Outlook Autodiscover Configuration

If your account settings revert automatically, clear cached Autodiscover XML profiles.

  1. Close Microsoft Outlook completely.
  2. Press Win + R to open the Run dialogue.
  3. Type the following path and press Enter:
    %localappdata%\Microsoft\Outlook
  4. Locate files ending in .xml that reference autodiscover or your email domain.
  5. Delete these cached XML files.
  6. Relaunch Outlook to force the application to download fresh DNS Autodiscover records from your current mail server.

Step 4: Install the Certificate into the Trusted Root Store

If using a private corporate mail server with an internal private certificate authority, install the certificate locally.

  1. When the Outlook certificate warning appears, click View Certificate….
  2. Click Install Certificate… at the bottom of the General tab.
  3. Select Current User (or Local Machine) and click Next.
  4. Choose the option Place all certificates in the following store and click Browse….
  5. Select Trusted Root Certification Authorities and click OK.
  6. Click Next, then Finish, and confirm the security warning prompt.

Step 5: Disable Encrypted Email Scanning in Third-Party Antivirus

Antivirus tools performing man-in-the-middle SSL inspection can break certificate validation.

  1. Open your installed third-party antivirus software (such as Avast, AVG, Bitdefender, or ESET).
  2. Navigate to Settings > Protection > Mail Shield (or Email Protection).
  3. Locate the setting labelled Scan SSL/TLS connections or Check certificates.
  4. Disable SSL mail scanning. (Your incoming email remains fully protected by real-time file shields upon disk write).
  5. Restart Outlook to verify that mail synchronisation operates cleanly.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.