> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Routing Redirection and Rewrite Policies

> Practical guide to Azure Application Gateway routing, URL redirection, rewrite policies and a portal walkthrough for path based routing and backend configuration

This article explains how Azure Application Gateway handles three core responsibilities for web front-ends: request routing, URL redirection, and rewrite policies. These features help you build secure, scalable, and high-performance application delivery in Azure.

<Callout icon="lightbulb" color="#1CB2FE">
  This guide focuses on practical configuration patterns—basic vs path-based routing, common redirection scenarios, and rewrite rules—plus a step-by-step Azure Portal walkthrough to create an Application Gateway that routes /api and /images paths to separate backend pools.
</Callout>

## 1. Request routing rules

Routing rules determine how incoming HTTP(S) requests are mapped to backend pools. Every routing rule must be associated with a listener (the listener accepts traffic on a specific protocol, port, and hostname) and HTTP settings.

Two primary rule types:

| Rule type          | When to use                                        | Behavior / Example                                                                              |
| ------------------ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Basic              | Single backend for all traffic matching a listener | All traffic on the listener goes to one backend pool (simplest setup)                           |
| Path-based routing | Multiple backends depending on request URL path    | Route `/api/*` → API backend, `/images/*` → Image backend; the most specific path match applies |

Path-based routing selects the most specific matching path pattern for a request. When designing path patterns, be deliberate about ordering and specificity—within a single routing rule, the gateway applies the first matching pattern.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/application-gateway-request-routing-diagram.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=da0c67f8814a2189048d63218041cfce" alt="The image shows a diagram of &#x22;Application Gateway Request Routing Rules,&#x22; detailing rule types as basic and path-based, with a menu highlighting associated backend pools." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/application-gateway-request-routing-diagram.jpg" />
</Frame>

Path-based routing is especially useful to separate workloads (for example, static assets vs APIs), enabling independent scaling, deployment, and optimization for each service.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/url-path-routing-application-gateway.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=bb621e81afad7ad116e941f0f68ea05a" alt="The image illustrates configuring URL path-based routing, showing how requests to specific URL paths are directed to designated backend server pools via an application gateway. It includes examples, such as requests to &#x22;/images/&#x22; directed to an Image Server Pool and &#x22;/video/&#x22; to a Video Server Pool." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/url-path-routing-application-gateway.jpg" />
</Frame>

Benefits of path-based routing:

* Scalability: scale image servers independently from APIs.
* Performance: route static content to optimized servers or CDN frontends.
* Operational separation: different teams can own different backends.

## 2. URL Redirection

Redirection rules forward clients to different URLs or protocols based on conditions. Common scenarios include upgrading HTTP to HTTPS and migrating or consolidating endpoints.

Redirection types:

* Global redirection: redirect all requests from one listener to another (typical HTTP → HTTPS).
* Path-based redirection: redirect only requests that match certain paths (for example, `/cart/*`).
* Redirect to external site: send traffic to an external URL (configured with a dedicated redirect setting).

Supported HTTP redirect status codes:

| Status code | Meaning                               |
| ----------- | ------------------------------------- |
| 301         | Permanent redirect                    |
| 302         | Temporary redirect (Found)            |
| 303         | See Other                             |
| 307         | Temporary Redirect (preserves method) |

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/application-gateway-redirection-configuration.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=7376a7eb7fce223b8c08c4ef624f7029" alt="The image illustrates configuring redirection in an application gateway, highlighting global redirection, which directs traffic from one listener to another, usually for HTTP to HTTPS redirection. It includes a sidebar with different redirection options." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/application-gateway-redirection-configuration.jpg" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/path-based-redirection-configuration-interface.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=5f16587aa08102804ff26cfbe7c986d6" alt="The image shows a configuration interface for path-based redirection, used to set up URL redirection for specific paths like &#x22;/cart/*&#x22;." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/path-based-redirection-configuration-interface.jpg" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/redirection-options-external-site-diagram.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=47b834901d41877d6869fa0e6342cbfb" alt="The image shows a menu for configuring redirection options with a focus on &#x22;Redirect to External Site,&#x22; and a diagram indicating how redirection works." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/redirection-options-external-site-diagram.jpg" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/redirection-configuration-interface-options.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=3ea8ed53ad87be9d7928b0b02cda91ac" alt="The image shows a configuration interface for redirection types, with options like global and path-based redirection, and various HTTP status codes such as 301, 302, 303, and 307." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/redirection-configuration-interface-options.jpg" />
</Frame>

When to choose which redirect code:

* Use 301 for permanent URL changes (search engines update indexes).
* Use 302/307 for temporary redirection (clients should continue to request the original URL later).
* Use 307 instead of 302 when you must preserve the original HTTP method (e.g., POST).

## 3. Rewrite policies

Rewrite rules let you modify HTTP requests/responses that flow through Application Gateway:

* Add, remove, or modify request and response headers (useful for security headers, or injecting tracing headers).
* Change URL path or query string values.
* Re-evaluate path-based routing after rewriting the path (re-route).

Rewrite sets are created independently and then associated with routing rules. You can add conditions so a rewrite only applies when specific criteria are met (for example, a header value or path pattern).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/rewrite-policies-tutorial-buttons-rules.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=0043d0cafa5fb00b0f1d9b6f437483f6" alt="The image shows a tutorial on configuring rewrite policies with buttons for adding, deleting, and organizing rewrite rules in a rule set. It includes options like Request Routing Rule Association, Rewrite Condition, and Rewrite Type." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/rewrite-policies-tutorial-buttons-rules.jpg" />
</Frame>

Example rewrite use cases:

* Add `Strict-Transport-Security` header to responses.
* Strip internal path prefixes (`/internal-api/*` → `/api/*`) and then re-route.
* Inject A/B test headers for specific user cohorts.

## 4. Portal walkthrough: create an Application Gateway with path-based routing

This walkthrough demonstrates creating an Application Gateway in the Azure Portal that routes `/api` requests to an API backend and `/images` requests to an image backend.

Start from your Resource Group (example: `rg-az700-appgw`) that contains your backend virtual machines.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-resource-groups-rg-az700.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=551d1846418e2e5a084c55f36ce89d88" alt="The image shows the Microsoft Azure portal interface focused on resource groups, specifically displaying details for the resource group &#x22;rg-az700-appgw&#x22; with its various management and configuration options." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-resource-groups-rg-az700.jpg" />
</Frame>

Step-by-step summary:

1. Create Application Gateway resource:
   * Name: e.g., `AZ70001`
   * Region: match the VMs
   * Tier: `Standard_v2` (choose `WAF_v2` if you need a managed Web Application Firewall)
   * Scale: choose instance count or enable autoscaling
   * IP type: IPv4 or dual-stack as required

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-application-gateway-creation.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=a697f7b98ff414768b5c9aa78d007561" alt="The image shows a Microsoft Azure portal page for creating an application gateway. It includes fields for project and instance details, such as subscription, resource group, gateway name, region, tier, and IP address type." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-application-gateway-creation.jpg" />
</Frame>

2. Configure the Application Gateway subnet:
   * Application Gateway requires a dedicated subnet, typically named `ApplicationGatewaySubnet`.
   * Choose an address range sized for your expected scale (e.g., `/27` if not using autoscaling).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/microsoft-azure-add-subnet-screenshot.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=21b7206cd20dd0d3adb11dafaef55604" alt="The image shows a screenshot of the Microsoft Azure portal, specifically the &#x22;Add a subnet&#x22; page, where configuration details for a new subnet in a virtual network are being set. There are options for configuring IPv4 address space, with fields for subnet name, address range, and size." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/microsoft-azure-add-subnet-screenshot.jpg" />
</Frame>

3. Frontend configuration:
   * Create or select a public IP (e.g., `AppGateway-AZ700-PIP`) for internet-facing access, or configure private frontend IP for internal scenarios.

4. Create backend pools:
   * Example names: `AppGW-AZ-700-BEP-API` and `AppGW-AZ-700-BEP-IMG`.
   * Targets: virtual machines, VMSS, NICs, IP addresses, or FQDNs.

5. Configure listeners and HTTP settings:
   * Listener: protocol (HTTP/HTTPS), port (e.g., 80 or 443), and hostname.
   * HTTP settings: backend port, protocol, cookie-based affinity (session stickiness), and health probe association.

6. Add path-based routing rules:
   * Example path mappings:
     | Path pattern | Backend pool           | HTTP setting          |
     | ------------ | ---------------------- | --------------------- |
     | `/api/*`     | `AppGW-AZ-700-BEP-API` | API HTTP settings     |
     | `/images/*`  | `AppGW-AZ-700-BEP-IMG` | IMG HTTP settings     |
     | default      | default backend        | default HTTP settings |

When adding a path-based rule, bind each pattern to the appropriate backend target and HTTP setting; define a default backend for unmatched paths.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-application-gateway-configuration.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=09574199f439e49d34afd59385df51a5" alt="The image shows a Microsoft Azure portal interface for creating an application gateway, specifically on the configuration step, where a user is adding a path and setting backend options." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-application-gateway-configuration.jpg" />
</Frame>

7. Review and create. Deployment may take several minutes.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-application-gateway-interface-settings.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=f4ef1126c44f4a2d41b60db85f43b030" alt="The image shows a Microsoft Azure interface for creating an application gateway, displaying basic settings like subscription, resource group, and region." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-application-gateway-interface-settings.jpg" />
</Frame>

After deployment completes, open the Application Gateway resource from your Resource Group.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-deployment-complete-screen.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=63b4891b19e99fdbc6eb9dad08b0867f" alt="The image shows the Microsoft Azure portal screen indicating that a deployment for &#x22;Microsoft.ApplicationGateway&#x22; is complete, with options to view details and navigate to the resource group." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-deployment-complete-screen.jpg" />
</Frame>

## 5. Post-deployment management

In the Application Gateway blade you can view and manage:

* Web Application Firewall (if enabled)
* Backend pools
* Backend HTTP settings
* Frontend IP configurations
* Private link and SSL settings
* Listeners
* Rules (basic & path-based)
* Rewrite sets
* Health probes

If you did not create a custom health probe during initial configuration, add one and associate it with the HTTP settings to gain precise control over health checks.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/add-health-probe-azure-portal.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=64f69f9679ab98373153f029cd74052e" alt="This image shows the &#x22;Add health probe&#x22; configuration screen on the Microsoft Azure portal, where settings such as protocol, host, path, and intervals can be defined for an application gateway." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/add-health-probe-azure-portal.jpg" />
</Frame>

Link backend targets to your pools (select VMs, IPs, or FQDN). After saving, the backend pool displays configured targets and their IPs.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-backend-pool-editing.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=70edb68dbe756e32ec396e08376dd148" alt="The image shows the Microsoft Azure portal interface for editing a backend pool, where you can configure target types and targets, such as virtual machines and IP addresses." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-backend-pool-editing.jpg" />
</Frame>

Updates to configuration may take a short time to propagate. Portal notifications show deployment progress and status.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-backend-pools-notifications.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=a9af6747ec703feb4638ff7a0cdda855" alt="The image shows the Microsoft Azure portal, specifically the &#x22;Backend pools&#x22; section of an application gateway. There are notifications on the right, indicating deployment progress and other recent activities." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-backend-pools-notifications.jpg" />
</Frame>

Once running, copy the Application Gateway public IP and test in a browser. Requests should be routed according to your path rules (for example, `/api` returns API responses).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/api-endpoint-active-green-screen.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=2253157b83ea2bc8375b7733bda46576" alt="The image shows a green screen with a message indicating &#x22;API Endpoint Active&#x22; along with server information and a note about the API backend path." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/api-endpoint-active-green-screen.jpg" />
</Frame>

Load distribution is typically round-robin across backend instances. Enable cookie-based affinity in HTTP settings if you require session persistence (sticky sessions).

If you see 404s on a path, verify:

* Path mappings in the routing rule.
* Backend content (for example, `index.html` exists in the images folder).
* Health probe results and logs.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-routing-rule-configuration.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=51a2a2fbf53c0d3965a3f81c5570853c" alt="The image shows a configuration screen for creating a routing rule in the Microsoft Azure portal. It includes options for setting up backend targets, listener settings, and path-based routing rules." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-routing-rule-configuration.jpg" />
</Frame>

## 6. Configuring rewrite rules in the portal

Create a rewrite set, add ordered rewrite rules with conditions and actions (modify headers, paths, queries), and then associate the rewrite set with the appropriate routing rule.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-rewrite-set-interface.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=e48f9697daa893377932f2248a6d396d" alt="The image shows the Microsoft Azure portal interface for creating a rewrite set. It includes fields for naming the rewrite rule and setting a rule sequence." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-portal-rewrite-set-interface.jpg" />
</Frame>

## 7. Health checks and backend health

Application Gateway exposes backend health status showing each instance, probe response codes (for example `200 OK`), and failing backends for troubleshooting. If you need custom health behavior, create and associate custom probes.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/ha0B30zwd06UUiE4/images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-application-gateway-backend-health-status.jpg?fit=max&auto=format&n=ha0B30zwd06UUiE4&q=85&s=4711d56ad05bbc23db0008e97eef7088" alt="The image shows the &#x22;Backend health&#x22; status page of an Azure Application Gateway, indicating all backend servers are healthy, with each receiving a 200 status code." width="1920" height="1080" data-path="images/AZ-700-Designing-and-Implementing-Microsoft-Azure-Networking-Solutions/Design-Azure-Application-Gateway/Routing-Redirection-and-Rewrite-Policies/azure-application-gateway-backend-health-status.jpg" />
</Frame>

<Callout icon="lightbulb" color="#1CB2FE">
  If you need more control over health checks, create and associate custom health probes with the HTTP settings. Custom probes let you define host, path, interval, and success thresholds.
</Callout>

## Quick reference

| Component     | Purpose                                                                   |
| ------------- | ------------------------------------------------------------------------- |
| Listener      | Accepts incoming traffic on a protocol, port, and optionally hostname     |
| Routing rule  | Binds a listener to backend pools and HTTP settings (basic or path-based) |
| Backend pool  | Group of targets (VMs, VMSS, IPs, FQDN) serving requests                  |
| HTTP settings | Configure backend port, protocol, affinity, and health probe              |
| Rewrite set   | Collection of rewrite rules to alter headers, paths, or queries           |
| Health probe  | Checks backend health (default or custom)                                 |

## Links and references

* Azure Application Gateway documentation: [https://learn.microsoft.com/azure/application-gateway/](https://learn.microsoft.com/azure/application-gateway/)
* Application Gateway configuration samples and how-to guides: [https://learn.microsoft.com/azure/application-gateway/configuration-overview](https://learn.microsoft.com/azure/application-gateway/configuration-overview)

This covers the core concepts of Application Gateway request routing, redirection types, rewrite policies, and a practical portal walkthrough for path-based routing.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/az-700-designing-and-implementing-microsoft-azure-networking-solutions/module/50c3966d-1fc5-45b0-8339-5c8be2ce49c3/lesson/d1ad4748-374b-4944-9ae8-5751399cb742" />
</CardGroup>
