Exchange ServerHow-to

Exchange Server behind F5, Kemp or NetScaler: health checks, SSL and bad-VIP errors

Set up any load balancer for Exchange Server SE and 2019: per-protocol healthcheck.htm monitors, SSL bridging with Extended Protection, no affinity, SMTP and Kerberos, and bad-VIP symptoms.

A load balancer in front of Exchange Server only helps if it knows when a protocol on one server is unhealthy, and if it leaves Exchange's authentication intact. In this post I'll set up the parts that matter on any F5 BIG-IP, Kemp LoadMaster or NetScaler: per-protocol health checks, SSL handling that survives Extended Protection, persistence, SMTP and Kerberos, then match the symptoms of a VIP that gets them wrong.

Errors this guide fixes

  • HTTP Error 503. The service is unavailable.Browser (OWA / ECP)
  • The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.Outlook+1 more guide
  • The Kerberos client received a KRB_AP_ERR_MODIFIED error from the serverSystem log (Event ID 4)+1 more guide
  • 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domainSMTP client / app relaying via the VIP+7 more guides
How this guide is organised: How it works → Step-by-step → Symptoms of a bad VIP → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (6 steps: Namespace and certificate; One monitor per protocol; Bridge SSL, don't offload it; Persistence and timeouts; SMTP; Kerberos). 3. Symptoms of a bad VIP. 4. Verify. 5. Tips & gotchas. Toolbox: Get-ExchangeCertificate, curl.exe, curl, SSL Acceleration › Reencrypt, healthcheck.htm.1How it works2Step-by-step3Symptoms of abad VIP4Verify5Tips & gotchas1Namespaceand certificate2One monitorper protocol3Bridge SSL,don't offload it4Persistenceand timeouts5SMTP6KerberosTOOLBOXGet-ExchangeCertificatecurl.execurlSSL Acceleration › Reencrypthealthcheck.htmHow this guide is organised: How it works → Step-by-step → Symptoms of a bad VIP → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Step-by-step (6 steps: Namespace and certificate; One monitor per protocol; Bridge SSL, don't offload it; Persistence and timeouts; SMTP; Kerberos). 3. Symptoms of a bad VIP. 4. Verify. 5. Tips & gotchas. Toolbox: Get-ExchangeCertificate, curl.exe, curl, SSL Acceleration › Reencrypt, healthcheck.htm.1How it works2Step-by-step1Namespace and certificate2One monitor per protocol3Bridge SSL, don't offload it4Persistence and timeouts5SMTP6Kerberos3Symptoms of a bad VIP4Verify5Tips & gotchasTOOLBOXGet-ExchangeCertificatecurl.execurlSSL Acceleration › Reencrypthealthcheck.htm
At a glance: how this guide is organised · 6 steps · 5 key settings and tools

How it works#

Since Exchange 2016 every native client uses HTTP(S), and whichever Mailbox server receives a request proxies it to the server hosting the active mailbox copy. Microsoft's load-balancing guidance therefore states that session affinity is no longer required. The sign-in cookie is encrypted with the Client Access services certificate, so any server holding the same certificate can read it. Windows NLB can't run alongside the clustering that DAG members use, which is why appliances or virtual load balancers are the norm.

Layer 4Layer 7
SeesIP address, protocol, portThe HTTP path (/owa, /mapi, /Microsoft-Server-ActiveSync)
HealthOne probe per namespace: if it fails, the server leaves the pool for every protocol (unless each protocol gets its own namespace)One probe per virtual directory: only the failed protocol moves
TLSPassed through to ExchangeTerminated on the load balancer

Microsoft recommends a single namespace, no affinity and layer 7 for Exchange 2016 and 2019 (the same applies to Exchange Server SE). The link to Exchange's own monitoring is healthcheck.htm: when Managed Availability's offline responder takes a protocol, or the whole server, out of service, https://<server>/<vdir>/healthcheck.htm stops answering 200. A probe on / or on TCP 443 only proves IIS is up. The same mechanism drains a server in maintenance mode.

Step-by-step#

1. Namespace and certificate#

Publish one namespace (for example mail.contoso.com) plus autodiscover.contoso.com on the VIP, and set every virtual directory URL to it. Install the same certificate on every server behind the VIP and, if the load balancer terminates TLS, on the load balancer.

2. One monitor per protocol#

Create an HTTPS monitor for each pool: /owa/healthcheck.htm, /ecp/healthcheck.htm, /ews/healthcheck.htm, /mapi/healthcheck.htm, /Microsoft-Server-ActiveSync/healthcheck.htm, /oab/healthcheck.htm, /autodiscover/healthcheck.htm and /rpc/healthcheck.htm if Outlook Anywhere is still used. Mark a member up only on HTTP 200. With layer 4 and one namespace, Microsoft suggests probing your most-used virtual directory.

On F5 BIG-IP, don't use the default http/https monitors: F5 documents that without a Receive String they accept any response. Build a custom HTTPS monitor whose Send String is a complete HTTP/1.1 request (HTTP/1.1 requires a Host header):

Text
Send String:    GET /owa/healthcheck.htm HTTP/1.1\r\nHost: mail.contoso.com\r\nConnection: Close\r\n\r\n
Receive String: 200 OK

On Kemp LoadMaster and NetScaler, configure the equivalent HTTPS check per service: the health-check URL path, your namespace as host, success only on 200.

3. Bridge SSL, don't offload it#

Extended Protection is on by default from Exchange 2019 CU14, and Microsoft requires SSL offloading for Outlook Anywhere to be disabled. Terminating TLS on the load balancer and sending plain HTTP to Exchange breaks Windows authentication under Extended Protection; re-encrypt to Exchange (SSL bridging) with the same certificate on the load balancer and the servers, which is Microsoft's condition for supporting Extended Protection with SSL bridging. On LoadMaster that's SSL Acceleration › Reencrypt on the Exchange virtual service, as the Progress Community article describes. Layer 4 passthrough is also fine, because TLS ends on Exchange.

PowerShell
Get-OutlookAnywhere | Format-Table Server,SSLOffloading -AutoSize   # want False

4. Persistence and timeouts#

Leave persistence off; Microsoft notes that affinity reduces load-balancer capacity. Make idle timeouts generous: Outlook, ActiveSync and EWS notifications hold long-lived connections, and a short timeout appears as random disconnects.

5. SMTP#

If ports 25 or 587 go through the VIP with source NAT, Exchange sees the load balancer's address. Relay connectors that trust RemoteIPRanges can't identify applications any more: relay fails with 5.7.54, or, if you add the load balancer's IP, everything behind the VIP can relay. Preserve the client source IP or give relaying applications a separate path (see the relay guide).

6. Kerberos#

Several servers answering one namespace need an alternate service account (ASA). If the namespace SPN sits on one computer account, clients routed to another server log KRB_AP_ERR_MODIFIED.

Symptoms of a bad VIP#

What you seeUsual load-balancer causeFirst check
HTTP Error 503. The service is unavailable. for some OWA/ECP usersMonitor not on healthcheck.htm, or no receive string, so a server with a failed protocol stays in the poolPer-server probe test below
Outlook: The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action., or DisconnectedMAPI pool down, layer 4 probe on another virtual directory, idle timeout too short/mapi/healthcheck.htm per server; VIP timeouts (Outlook guide)
Password prompts after CU14 or enabling Extended ProtectionSSL offloading, or a different certificate on the load balancerRe-encrypt with the same certificate (Extended Protection)
OWA sign-in page keeps returningServers behind the VIP have different certificates, so the next server can't read the cookieCompare thumbprints with Get-ExchangeCertificate
The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server (System log, Event ID 4)Namespace SPN on a computer account, no ASAASA credential on every server
550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain for an appSource NAT hides the app's IPSMTP receive protocol log

Verify#

Probe every server by IP with your namespace name (use curl.exe, because curl is an alias in Windows PowerShell):

PowerShell
foreach ($ip in "10.0.0.11","10.0.0.12") {
  foreach ($v in "owa","ecp","ews","mapi","Microsoft-Server-ActiveSync","oab","autodiscover") {
    $code = curl.exe -s -o NUL -w "%{http_code}" --resolve "mail.contoso.com:443:$ip" "https://mail.contoso.com/$v/healthcheck.htm"
    "{0,-12} {1,-28} {2}" -f $ip, $v, $code
  }
}
Get-ServerComponentState -Identity EX01 | Where-Object { $_.State -ne "Active" }
Get-HealthReport -Identity EX01 | Where-Object { $_.AlertValue -ne "Healthy" }

Good: 200 everywhere, matching the load balancer's member status, no inactive components. Then, in a maintenance window, set ServerWideOffline to Inactive on one server: every monitor should mark it down within a few probe intervals, and come back when you set it Active again.

Tips & gotchas#

  • Probe the servers, not the VIP, and keep probes per pool so one failed protocol doesn't drain the server.
  • After renewing the certificate, update the load balancer's copy too when bridging (certificate renewal).
  • A component left Inactive after an update looks like a load-balancer fault: the monitors are right to pull the server.
  • Read Managed Availability health sets before blaming the appliance for a server it keeps marking down.

References#

Revision history: Oct 2026 — re-checked against Microsoft Learn and the vendors' documentation: 1 detail reworded or labelled as reported by admins.

Written and checked against current Microsoft Learn documentation and the vendor documentation linked in the references. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)