Putting Azure Front Door (AFD) in front of Power Pages is a common pattern for performance, security (WAF), and centralized routing.
But when you introduce a custom domain, one setting becomes critical:
Origin host header — without it, you’ll run into a 421 Misdirected Request (SSLMismatchedSNI).
This post explains the custom domain setup, why the 421 happens, and the safe steps to avoid it.
https://portal.example.com
xxxxxxxx.azurefd.net
site-abc.powerappsportals.com
AFD terminates TLS at the edge for portal.example.com
, then forwards requests to the Power Pages origin.
site-abc.powerappsportals.com
). portal.example.com
with an AFD-managed certificate. portal.example.com
→ site-abc.powerappsportals.com
(Power Pages validation requires this). portal.example.com
→ xxxxxxxx.azurefd.net
. portal.example.com
. The critical ordering: bind the domain in Power Pages before setting Origin host header to the custom domain. Otherwise you’ll get 421 SSLMismatchedSNI.
AFD → Origin groups → Add origin
site-abc.powerappsportals.com
Why this matters: the origin host name controls where AFD connects and which certificate the origin presents during TLS. It should remain the Power Pages host.
AFD → Domains → Add
portal.example.com
xxxxxxxx.azurefd.net
and the default route (/*
)DNS (first pass): Point portal.example.com
to AFD with a CNAME:
portal.example.com CNAME xxxxxxxx.azurefd.net
This proves ownership and issues an edge certificate, but Power Pages still doesn’t know about this host yet.
If you browse https://portal.example.com
without setting the Origin host header, you’ll likely see:
421 - Misdirected Request Error Info: SSLMismatchedSNI
site-abc.powerappsportals.com
) but forwards with the wrong host header. portal.example.com
yet → the certificate won’t match → SSL handshake fails → 421.Power Pages requires that during validation, the custom domain’s CNAME points directly to the portal host.
Temporarily change DNS:
portal.example.com CNAME site-abc.powerappsportals.com
Then in Power Pages Admin:
portal.example.com
Tip: Reduce the CNAME record’s TTL before you start, so flipping back to AFD is quick.
Once Power Pages shows the domain is mapped and its certificate is provisioned:
portal.example.com CNAME xxxxxxxx.azurefd.net
You now have:
portal.example.com
. Host: portal.example.com
at the origin (because it’s been bound there too).Now it’s safe to set:
AFD → Origin groups → (your origin) → Origin host header = portal.example.com
This tells AFD to forward:
Host: portal.example.com
Result: Power Pages generates absolute URLs and accepts TLS correctly for the custom domain.
Client │ https://portal.example.com ▼ Azure Front Door (WAF, TLS at edge) │ Host: portal.example.com ▼ Power Pages (domain bound, TLS at origin)
When you put Azure Front Door in front of Power Pages with a custom domain:
Following these steps ensures smooth routing, correct certificates, and no surprises with custom domain access.
Legal Stuff