Networking Application Gateway field-manual-complete field-manual field-manual-complete

URL path map

A URL path map tells Application Gateway where to send traffic based on the path after the host name. For example, requests for /images can go to one backend pool, while /api goes to another. This lets one public entry point support several application components without making users remember different domains. The map is the rulebook that connects path patterns, backend pools, and HTTP settings into a predictable routing decision, so edge routing stays visible instead of being buried in application code.

Aliases
path-based routing map, Application Gateway path map, URL route map, path rule map
Difficulty
intermediate
CLI mappings
5
Last verified
2026-05-28

Microsoft Learn

A URL path map is an Azure Application Gateway configuration that routes requests to different backend pools based on path patterns in the URL. It connects path rules, backend targets, and HTTP settings so one gateway can serve multiple application paths.

Microsoft Learn: URL path-based routing overview for Azure Application Gateway2026-05-28

Technical context

In Azure architecture, a URL path map belongs to an Application Gateway request-routing rule. It works with listeners, frontend IP addresses, backend address pools, backend HTTP settings, probes, redirects, and optional rewrite rules. The gateway evaluates host and path information at layer seven, then selects the backend configuration attached to the matching path rule. This is data-plane routing, but it is managed through control-plane resources such as ARM templates, Bicep, Azure CLI, and portal configuration.

Why it matters

URL path maps matter because modern applications rarely fit behind one backend. Static content, APIs, admin portals, and legacy services may need different pools, ports, probes, authentication behavior, or deployment schedules. A path map keeps those decisions at the gateway where operations teams can inspect and change them deliberately. Misconfigured path maps cause painful incidents: one prefix returns 502, another leaks admin traffic to a public pool, or a new service steals the default route. Good path maps make migrations, blue-green releases, WAF tuning, and ownership boundaries safer because each path has an explicit destination and test plan. It also protects rollback.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In Application Gateway configuration, path-based routing rules show a URL path map with path patterns, backend pools, backend HTTP settings, listeners, and default targets. clearly

Signal 02

Azure CLI url-path-map output lists path rules, default backend pool, default HTTP setting, and the gateway resource that owns the routing decision during reviews.

Signal 03

Access logs and synthetic tests show one URL prefix returning 502, wrong content, or redirects while other paths on the same listener stay healthy after deployments.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Route /api, /media, and /admin paths to separate backend pools while keeping one public gateway and certificate.
  • Move one legacy path to a new service during migration without changing DNS or disturbing other application paths.
  • Apply different health probes and backend HTTP settings to components that share a hostname but run on different ports.
  • Create a controlled blue-green cutover by changing one path rule instead of redeploying the entire gateway.
  • Troubleshoot customer 404 or 502 errors by tracing which path pattern matched and which backend received the request.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Travel platform separates booking APIs from media traffic

Travel platform separates booking APIs from media traffic: A URL path map makes shared hostnames practical when every path needs a clearly owned backend and rollback path.

Scenario

A travel booking platform served search, booking, images, and partner callbacks through one hostname. A rushed release routed /api/payment callbacks to the image backend, causing failed reservations during a holiday sale.

Business/Technical Objectives
  • Keep one public hostname while separating backend ownership by path.
  • Reduce payment callback routing errors to near zero.
  • Enable safer releases for image delivery without touching booking APIs.
  • Make Application Gateway routing visible in deployment reviews.
Solution Using URL path map

The platform team rebuilt Application Gateway routing around a URL path map. /api/search and /api/booking pointed to API pools with strict health probes, /media/* routed to optimized image servers, and /partner/callbacks used a separate backend HTTP setting with tighter timeout behavior. Path rules were exported through Azure CLI into pull requests, so reviewers could see exactly which pool and setting each path used. Access logs were added to a workbook that grouped response codes by path pattern and backend pool after every release.

Results & Business Impact
  • Payment callback routing incidents fell from six in two months to zero in the next peak campaign.
  • Image releases no longer required booking API redeployments, cutting release coordination time by 45 percent.
  • Mean time to identify a bad route dropped from 50 minutes to under 10 minutes using path-based logs.
Key Takeaway for Glossary Readers

A URL path map makes shared hostnames practical when every path needs a clearly owned backend and rollback path.

Case study 02

University admissions portal handles document uploads separately

University admissions portal handles document uploads separately: URL path maps help one portal behave like several purpose-built services without forcing users onto multiple hostnames. with tested rollback evidence

Scenario

A university admissions team received application forms, transcript uploads, and status checks through one portal. Large upload traffic overloaded the same backend that served deadline status pages. during deadline week

Business/Technical Objectives
  • Separate upload-heavy paths from lightweight status pages.
  • Keep the public admissions URL unchanged for applicants.
  • Improve status-page latency during deadline week.
  • Give support staff a clear route map for 502 investigations.
Solution Using URL path map

Engineers placed Application Gateway in front of the portal and configured a URL path map with /upload/* routed to a backend pool tuned for larger request bodies and storage integration. /status/* and /apply/* used smaller web nodes with aggressive health probes. The default route stayed on the main portal, but unmatched upload paths were tested before launch. CLI exports of the path map became part of the admissions freeze checklist, and access logs were retained through the application deadline period. The rollback checklist also identified the default backend owner.

Results & Business Impact
  • P95 status-page latency during the deadline window improved from 2.8 seconds to 650 milliseconds.
  • Upload retries dropped by 38 percent because large requests no longer competed with status traffic.
  • Support tickets about generic gateway errors fell by 52 percent after logs identified the affected path quickly.
Key Takeaway for Glossary Readers

URL path maps help one portal behave like several purpose-built services without forcing users onto multiple hostnames. with tested rollback evidence safely

Case study 03

Streaming service routes device APIs during phased rewrite

Streaming service routes device APIs during phased rewrite: A URL path map is a precise migration lever when changing hostnames would be slower, riskier, or impossible.

Scenario

A streaming provider was rewriting its device activation API while keeping older smart-TV clients online. DNS changes were too risky because millions of devices cached endpoints for long periods.

Business/Technical Objectives
  • Move only the /activate path to a new backend service.
  • Keep legacy playback and catalog paths untouched during migration.
  • Rollback activation routing within minutes if device errors spiked.
  • Measure failures by path and backend version.
Solution Using URL path map

The edge team used an Application Gateway URL path map to route /activate/* to a new containerized backend while /catalog/* and /playback/* continued using existing VM pools. The new path rule used its own probe and backend HTTP setting, allowing tighter timeout and drain behavior. Azure CLI commands exported the pre-change path map, applied the update during a low-traffic window, and checked backend health immediately. Dashboards separated 4xx and 5xx rates by matched path so the team could distinguish broken device requests from broader gateway issues.

Results & Business Impact
  • The activation migration reached 25 percent of devices with rollback tested in under seven minutes.
  • Playback error rates stayed within the normal 0.2 percent baseline throughout the change.
  • Route-related support escalations were resolved 60 percent faster because teams could identify the matched path.
Key Takeaway for Glossary Readers

A URL path map is a precise migration lever when changing hostnames would be slower, riskier, or impossible.

Why use Azure CLI for this?

Azure CLI is useful for URL path maps because gateway configuration has many nested objects that are easy to misread in the portal. With ten years of Azure operations behind me, I prefer CLI when I need to list path rules, compare backend pools, export JSON before a change, and validate drift after a deployment pipeline runs. CLI also supports repeatable emergency fixes, such as adding a temporary path rule or proving that a blue-green cutover changed only the intended backend target. Repeatable exports make rollback safer and reduce late-night portal edits. It also makes peer review easier before production release.

CLI use cases

  • List all path maps on a gateway before changing production routing or WAF policy attachments.
  • Create a new path rule for a migration path while preserving the default backend route.
  • Compare backend health with the path rule that customers report as failing.
  • Export gateway JSON for code review and rollback before a blue-green path cutover.

Before you run CLI

  • Confirm subscription, resource group, gateway name, listener, backend pool, and HTTP settings because names are often reused across environments.
  • Understand that create and rule create commands mutate live routing and can immediately affect customer traffic.
  • Check WAF policy, certificates, probes, and backend network reachability before assuming a path rule alone fixes the issue.
  • Use JSON output for diffing nested configuration and table output only for quick inventory.

What output tells you

  • Path rule arrays show which URL patterns match and which backend pool and HTTP settings receive that traffic.
  • Default backend fields show where unmatched paths go, which is critical when wildcard rules are incomplete.
  • Backend health output shows whether the selected pool is reachable, healthy, and responding to the configured probe.
  • Resource IDs reveal whether the path rule points to the intended pool or an older pool with a similar display name.

Mapped Azure CLI commands

URL path map CLI commands

direct
az network application-gateway url-path-map list --gateway-name <gateway-name> --resource-group <resource-group>
az network application-gateway url-path-mapdiscoverNetworking
az network application-gateway url-path-map show --gateway-name <gateway-name> --resource-group <resource-group> --name <path-map-name>
az network application-gateway url-path-mapdiscoverNetworking
az network application-gateway url-path-map create --gateway-name <gateway-name> --resource-group <resource-group> --name <path-map-name> --paths /api/* --address-pool <pool-name> --http-settings <settings-name>
az network application-gateway url-path-mapprovisionNetworking
az network application-gateway url-path-map rule create --gateway-name <gateway-name> --resource-group <resource-group> --path-map-name <path-map-name> --name <rule-name> --paths /admin/* --address-pool <pool-name> --http-settings <settings-name>
az network application-gateway url-path-map ruleprovisionNetworking
az network application-gateway show-backend-health --name <gateway-name> --resource-group <resource-group>
az network application-gatewaydiscoverNetworking

Architecture context

Architecturally, a URL path map is the contract between the public application edge and backend service topology. It lets one gateway listener expose multiple application branches while each branch uses its own pool, health probe, port, and HTTP setting. I treat path maps as release-owned routing code, not a casual portal setting. They should be versioned with infrastructure code, reviewed with service owners, and paired with synthetic tests for every critical path. When an organization migrates from monolith to services, path maps often become the bridge that keeps the public URL stable while backends change behind it. Document ownership clearly.

Security

Security impact is direct at the edge. A URL path map decides whether sensitive paths reach the intended backend and whether WAF policy, rewrite behavior, and backend settings are appropriate for that path. A broad wildcard can accidentally expose admin or diagnostic routes. A wrong backend pool can bypass expected authentication middleware. Review path patterns, rule ordering, listener host names, TLS settings, WAF exclusions, and backend health before release. Treat path changes like security-sensitive routing changes, especially when one gateway fronts public and private application areas. Keep approval evidence for routes that expose administrative or customer-data functions. Review exceptions carefully.

Cost

The path map itself is not billed separately, but routing decisions influence cost. Sending heavy static downloads to the wrong dynamic backend wastes compute. Splitting paths across too many pools can create unused App Service plans, VM scale sets, or container replicas. Overly broad logging or WAF inspection on high-volume paths can raise monitoring and gateway costs. Cost reviews should look at request volume by path, backend utilization, egress patterns, and whether separate pools are still justified. A path map also helps cost allocation because owners can see which application branch is driving gateway, compute, and logging consumption. Review monthly.

Reliability

Reliability depends on clear path ownership, healthy backends, and safe rule changes. A path map can isolate a failing component if /api and /content use different pools, but it can also turn a small typo into a full customer-facing outage. Operators should validate default backend behavior, wildcard ordering, probe paths, and rollback steps before changing rules. Blue-green or canary releases should update path rules deliberately and monitor backend health. Keep configuration exports so the last working route map can be restored quickly, and run synthetic probes for every business-critical path before and after deployment. Probe evidence should be required for release.

Performance

Performance is affected by routing clarity, backend selection, probe behavior, and rule complexity. Application Gateway evaluates path rules quickly, but a wrong map sends users to backends with worse latency, cold caches, or unavailable dependencies. Static content should not accidentally land on an API pool, and API calls should not route through a backend tuned for file serving. Operators should monitor backend response time by path rule, failed requests, WAF inspection latency, and connection counts before deciding the gateway is the bottleneck. Path-specific load tests reveal slow branches hidden by gateway averages. Benchmark busy paths separately after each routing change.

Operations

Operational work centers on inspection, change control, and troubleshooting. Teams list URL path maps, identify which path rule matched a failing request, verify backend pool health, and compare gateway configuration with infrastructure-as-code source. During incidents, operators check access logs, HTTP status codes, backend health, and recent deployment changes. During planned releases, they create or update path rules, validate probes, test exact URLs, and confirm that default routing still behaves correctly for unmapped paths. Keep ticket numbers, owners, expected probe behavior, and before-and-after gateway exports beside every production path rule. This also keeps route ownership visible during incidents and audits.

Common mistakes

  • Creating overlapping wildcard paths without testing which rule wins for real customer URLs.
  • Pointing a path rule to the correct backend pool but the wrong HTTP setting or probe path.
  • Changing a production path map in the portal without exporting the previous configuration for rollback.
  • Forgetting that the default backend still handles every path not explicitly covered by the map.