Front Door
Tiers · endpoints, domains, origins · routing and health probes · TLS · caching and acceleration · rule sets, redirect, rewrite · Private Link origins
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Use cases and tiers
Azure Front Door is an advanced content delivery network (CDN) for the cloud. It is in the load-balancing and content delivery category with Azure Load Balancer and Azure Application Gateway. Standard and Premium deliver static and dynamic content from one tier, with caching, SSL offload and layer 3-4 DDoS protection.
| Capability | Standard | Premium | Classic |
|---|---|---|---|
| Positioning | Optimized for content delivery | Focuses on security | Retiring |
| WAF | Custom rules only | Full WAF capabilities (managed rule sets, bot protection) | Managed rules supported (older rule sets) |
| Private Link to origin | No | Yes | No |
| Client mutual TLS (mTLS) | No | Yes | No |
| Rules engine regular expressions and server variables | Yes | Yes | No |
| Create new profiles | Yes | Yes | No (since March 31, 2025) |
- Standard to Premium: use the upgrade capability. Premium to Standard: no seamless downgrade tool exists; re-create the profile.
- Classic to Standard or Premium: use the migration capability.
- Front Door supports only HTTP and HTTPS and requires a valid
Hostheader, which blocks many volumetric and protocol-based DDoS attack types. Enable Azure DDoS Protection on an origin virtual network to protect public IPs there. - Even short cache times (seconds or minutes) on dynamic responses can reduce load on the origin during an attack.
Endpoints, domains and origins
| Object | What it is |
|---|---|
| Endpoint | A logical grouping of one or more routes associated with domain names. Front Door gives it a generated domain name (generally under z01.azurefd.net). |
| Domain | A custom domain: subdomain, apex domain or wildcard domain. |
| Route | Associates a domain with an origin group and sets patterns to match, accepted protocols, forwarding protocol and caching. |
| Origin group | A set of origins that receives similar traffic. It defines health probes and the load-balancing method. |
| Origin | The application deployment Front Door retrieves content from: in Azure, on-premises or another cloud. |
| Rule set | A customized rules engine that can be associated with multiple routes. |
- Use one endpoint when domains share routes and you want to enable or disable them together. Use separate endpoints when each domain needs different routes and paths.
- By default, a deleted and redeployed endpoint can get the same domain label within the same Microsoft Entra tenant (
TenantReuse). Other scopes areSubscriptionReuse,ResourceGroupReuseandNoReuse. You can't change the reuse behavior of an existing endpoint. - The origin host header defaults to the origin host name when you use the Azure portal. An App Service origin must also have the custom domain name configured.
- When an origin is disabled, routing and health probes to it are disabled.
- Front Door APIs don't validate that an origin is reachable from Front Door during configuration. Make sure Front Door can reach it.
Custom domain validation and DNS
- Adding a domain needs two DNS records: a TXT record to validate ownership and a CNAME record to send traffic to Front Door. Use a CNAME, not an A record.
- The TXT record name is
_dnsauth.{subdomain}; the value comes from Front Door. A validation TXT record expires after seven days. - Add the TXT record before the CNAME to avoid downtime when you migrate an application that is already in production.
- Domains prevalidated by another Azure service skip Front Door validation. Front Door accepts only prevalidated domains that Azure Static Web Apps configured.
Routing, route matching and health probes
What happens to a request
- The client resolves the Front Door domain. Front Door's Traffic Manager returns the unicast IP of the best PoP.
- Front Door matches the
Hostheader to a profile (a custom domain must be registered). - The WAF rules are evaluated. A violated rule returns an error and stops processing.
- Front Door matches a route, then evaluates the route's rule sets in order (they can override the origin group or redirect).
- If caching is enabled and the edge has a valid response, it returns the cached response.
- Otherwise Front Door selects an origin by health, routing method and session affinity, and forwards the request.
| Routing method | How it works |
|---|---|
| Latency (default) | Lowest network latency within the latency sensitivity range. Default sensitivity is 0 ms, so requests always go to the fastest available origins and weights apply only to origins with equal latency. |
| Priority | Priority 1 to 5; lower value is higher priority. Active/passive failover. Several origins can share a value. |
| Weighted | Weight 1 to 1,000, default 50. Used for gradual upgrades, migration to Azure and cloud bursting. |
| Session affinity | Cookie-based (ASLBSA and ASLBSACORS), set at the origin group level for Standard and Premium. Off by default. |
Origin selection order: enabled and healthy origins, then top priority, then the latency range, then weights.
Route matching
- Front Door matches the most specific request, comparing protocol, domain and path in that order.
- Paths without a wildcard are exact-match; a path ending in
/is also exact. Path patterns are case insensitive. - If no route matches the host or the path, the request gets a 404 Bad Request. Add a catch-all path to avoid gaps.
Health probes
- Probes use HTTP or HTTPS on the same TCP ports as client requests; you can't override the port. The default method for new profiles is HEAD (lower load and cost). A 200 OK means healthy; any other status or no valid response is a failure.
- Sample size and successful samples required decide health. Example from Learn: 30-second interval, sample size 5, successful sample size 3 means at least three good probes in the last 150 seconds.
- If every origin in a group fails its probes, Front Door treats all as unhealthy and routes round robin across all of them.
- A group with a single origin can have probes disabled. You can't disable probes when several origins are enabled.
TLS and certificates
Front Door terminates TLS at the edge, decrypts, applies routing rules, then starts a new TLS connection to the origin. Set HTTPS as the forwarding protocol for end-to-end TLS.
| Topic | Rule |
|---|---|
| TLS versions | TLS 1.2 and 1.3. TLS 1.0 and 1.1 aren't supported. |
| Origin certificate | Must come from a valid CA with a complete chain, with a subject name that matches the origin host name. Internal CA and self-signed certificates aren't allowed. Disabling the subject name check is possible per origin but not recommended. |
| Managed certificate | Free, issued by DigiCert. Standard and Premium rotate it within 45 days of expiry, automatically when the CNAME points directly at the Front Door endpoint; otherwise revalidate the domain. Managed certificates work with wildcard domains. |
| Own certificate (BYOC) | Stored in Azure Key Vault. Secret version Latest rotates automatically; a pinned version needs a manual change and takes up to 24 hours to deploy. The Front Door service principal needs access to the vault. |
| Switching | Managed to BYOC needs no revalidation; BYOC to managed needs domain revalidation. |
| Client mTLS | Premium only, client to Front Door. No mTLS from Front Door to origins (including Private Link origins). |
Managed certificates can't be pinned: any part of the chain can change. To pin, use a customer-managed certificate. Some domains need a CAA record 0 issue digicert.com.
Traffic acceleration and caching
- Unicast: Standard and Premium use unicast for DNS and HTTP traffic. The PoP is chosen at DNS resolution; if the client location isn't in the request metadata, the DNS resolver location is used, so the PoP might not be the closest to the user. Classic uses anycast.
- Split TCP: the client's TCP connection ends at a nearby edge, and a separate, pre-established and reused connection goes to the origin. A TCP connection needs 3-5 roundtrips; the gain is multiplied for TLS.
- Rings: the outer ring is preferred; the inner ring handles overflow and failover.
| Caching topic | Rule |
|---|---|
| Cacheable methods | Only GET. Other methods are proxied. |
| Each edge | Has its own cache, so some traffic can still reach the origin. |
| Static vs dynamic | Cache images, CSS and JavaScript. Use separate routes for dynamic content with caching disabled. |
| Large files | No size cap. With caching, files are fetched in 8 MB chunks; the chunking relies on the origin supporting byte-range requests. |
| Query strings | Ignore Query String; Use Query String (each unique URL is its own asset; parameter order doesn't matter); include or exclude specified parameters. |
| Expiration order | s-maxage, then max-age, then Expires. No Cache-Control: a random duration of one to three days. Maximum 366 days. |
| Never cached | private, no-cache and no-store are honored even if a rule overrides caching. |
| Validator | Only Last-Modified; etag isn't supported. |
| Rules engine behavior | Honor origin, Override always, Override if origin missing. Rules engine caching overrides the route. |
| Purge | Up to 10 minutes to propagate; case-insensitive and query-string agnostic. Wildcard domains can't be purged directly: name a subdomain. |
Rule sets, redirect, rewrite and Private Link
- A rule set has rules; a rule has up to 10 match conditions (ANDed) and 5 actions. Rule sets and rules run in the order listed. The WAF is processed before route settings. Stop evaluating remaining rules skips later rule sets.
- Server variables work in rule set actions only. Regular expressions are supported in conditions.
- The route configuration override action changes the origin group or caching for a request. When you override the route configuration you must configure caching, or caching is disabled for the request.
- Redirect: by protocol, host name, path, query string and fragment. Types 301, 302, 307 and 308. Use 301 for HTTP to HTTPS. With 307 the client must not change the request method. Empty query string field keeps the incoming query string.
- Rewrite: prefix-based source pattern, destination path, and preserve unmatched path (default No removes the rest of the path). To drop the route's
/pattern-to-matchsegment, set the origin group's origin path to/.
Private Link to origins (Premium)
- Enable Private Link on the origin. Front Door creates a private endpoint from its managed regional network.
- Approve the pending private endpoint connection at the origin (portal, CLI or PowerShell).
- Wait a few minutes. Until then requests to that origin return a Front Door error.
- Supported origins: App Service (Web App, Function App), Blob Storage, storage static website, internal load balancers (and services behind them such as AKS), API Management, Application Gateway, Azure Container Apps. Not supported: App Service slots and Azure Static Web App.
- You can't mix public and private origins in one origin group. Enable Private Link on one origin at a time.
- Private Link supports connectivity only from Front Door to your origin, not from clients to Front Door.
- Each regional cluster limits a profile to 7200 requests per second; extra requests get 429. Use several origins in different Private Link regions.
- Origins with the same resource ID, group ID and region in one profile share one private endpoint (approved once). A different region, resource ID, group ID or profile needs another approval.
- Private Link is available only in regions with Availability Zone support.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Purge cached content | az afd endpoint purge --resource-group myRGFD --profile-name contosoafd --endpoint-name myendpoint --domains www.contoso.com --content-paths '/scripts/*' | Clear-AzFrontDoorCdnEndpointContent -ResourceGroupName myRGFD -ProfileName contosoafd -EndpointName myendpoint -Domain www.contoso.com -ContentPath /scripts/* |
| Create an endpoint with a domain reuse scope | az afd endpoint create --resource-group MyResourceGroup --profile-name MyProfile --endpoint-name myendpoint --name-reuse-scope SubscriptionReuse | New-AzFrontDoorCdnEndpoint -ResourceGroupName MyResourceGroup -ProfileName MyProfile -EndpointName myendpoint -Location global -AutoGeneratedDomainNameLabelScope SubscriptionReuse |
Exam Tips
Tick each tip once you can answer it without looking.
“The origin must not be reachable from the internet; only Front Door may reach it” → Front Door Premium with Private Link to the origin; approve the private endpoint connection at the origin.. Trap: Standard has no Private Link to origin. A request is pending until you approve it, and the origin type must be a supported one.
“Origin group mixes a public App Service and a Private Link origin” → Not allowed: keep public origins in one origin group and private origins in another.. Trap: Enabling Private Link on two public origins at the same time also fails (temporary mixed state); do one at a time.
“Private Link origin traffic over 7200 requests per second per profile in one region” → Add origins that use different Private Link regions in the same origin group.. Trap: Requests above 7200 RPS in a region are rate limited with 429; the fix is to spread traffic across Private Link regions.
“Which routing method is the default, and when do weights apply?” → Latency. Weights apply only when latency sensitivity lets origins compete or latencies are equal (default sensitivity 0 ms).. Trap: Priority and Weighted are not the default; a weight of 70/30 alone doesn't split traffic under default latency settings.
“Active/passive failover between two origins” → Priority routing (1 to 5, lower is higher priority).. Trap: Weighted spreads traffic across origins instead of keeping one as standby.
“Send 10% of traffic to a new origin and raise it over time” → Weighted routing (1 to 1,000, default 50).. Trap: Priority sends everything to the top-priority origin until it fails.
“Stateful app: the same user must reach the same origin” → Session affinity on the origin group (cookies ASLBSA and ASLBSACORS).. Trap: It is off by default, and a session isn't established when the origin's response is cacheable.
“Every origin in the group fails health probes” → Front Door treats all as unhealthy and routes round robin across all of them.. Trap: It doesn't stop serving traffic; it resumes normal balancing when an origin recovers.
“Requests get 404 Bad Request for a host or path you expected to work” → No route matches: register the domain and add a route with a matching or catch-all path.. Trap: A path without a wildcard is exact-match only, and path patterns are case insensitive.
“Redirect HTTP to HTTPS at the edge” → URL redirect in a rule set (or the route's Redirect setting) with protocol HTTPS only; 301 is the documented status for this.. Trap: Match request keeps the incoming protocol, so HTTP stays HTTP.
“Rewrite /sub/image/1.jpg to /foo/image/1.jpg (keep the rest of the path)” → URL rewrite with source /sub/, destination /foo/ and preserve unmatched path = Yes.. Trap: The default (No) removes the remaining path after the source pattern.
“Bring your own certificate that rotates without manual work” → Key Vault secret version Latest; the Front Door service principal needs access to the vault.. Trap: A specific version doesn't autorotate and takes up to 24 hours to deploy after you reselect it.
“HTTPS to the origin fails; the origin certificate name doesn't match the origin host name” → Fix the certificate or origin host name. The subject name check can be disabled per origin, but Learn says not to.. Trap: Even with the check disabled, the origin must present a certificate with a valid, trusted chain.
“Remove stale cached files now” → Purge the path (single path or /*); allow up to 10 minutes. For wildcard domains, name a specific subdomain.. Trap: Purge is case-insensitive and query-string agnostic, so one purge clears all query variations.
“Origin sends no Cache-Control header and caching is on” → Front Door caches for a random duration between one and three days; the maximum is 366 days.. Trap: private, no-cache and no-store responses aren't cached even if a rules engine action overrides caching.
“Cut connection and TLS setup time to a distant origin” → Split TCP: the client ends at a nearby edge; a separate reused connection goes to the origin.. Trap: The PoP is picked at DNS resolution; without client location it uses the resolver's location, so it can be a farther PoP.
“Which tier after Front Door (classic) retires on March 31, 2027?” → Migrate to Standard or Premium with the migration capability. Standard to Premium: upgrade. Premium to Standard: re-create.. Trap: There is no seamless Premium-to-Standard downgrade tool.
“Validate a custom domain without cutting over production traffic” → Add the _dnsauth.{subdomain} TXT record first, then the CNAME later.. Trap: The validation TXT record expires after seven days; an A record is not how you point a domain at Front Door.
Sources
- Azure Front Door overview
- Comparison between Azure Front Door and Azure Content Delivery Network (tiers and retirement)
- Front Door routing architecture
- Origins and origin groups
- Front Door caching
- Front Door traffic acceleration
- TLS encryption in Azure Front Door
- What is a rule set?
- URL redirect
- URL rewrite
- Secure your origin with Private Link in Azure Front Door Premium
- Traffic routing methods for origins
- How requests get matched to a route configuration
- DDoS protection on Azure Front Door
- Domains in Azure Front Door
- Endpoints in Azure Front Door
- Health probes
- Rule set actions
- Quickstart: Create an Azure Front Door using the Azure portal
- Purge cache for Azure Front Door
Checked against Microsoft Learn on November 13, 2026.