You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/frontdoor/standard-premium/how-to-enable-private-link-web-app.md
+84-16Lines changed: 84 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
-
title: 'Connect Azure Front Door Premium to an App Service (Web App or Function App) origin with Private Link'
2
+
title: Connect Azure Front Door to an App Service Origin
3
3
titleSuffix: Azure Private Link
4
4
description: Learn how to connect your Azure Front Door Premium to a web app or function app privately.
5
5
author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: azure-frontdoor
8
8
ms.topic: how-to
9
-
ms.date: 11/15/2024
10
-
ms.custom:
11
-
- build-2025
9
+
ms.date: 07/31/2025
10
+
ms.custom:devx-track-azurecli, build-2025
11
+
zone_pivot_groups: front-door-dev-exp-portal-cli
12
12
---
13
13
14
14
# Connect Azure Front Door Premium to an App Service (Web App or Function App) origin with Private Link
@@ -19,18 +19,39 @@ This article guides you through configuring Azure Front Door Premium to connect
19
19
20
20
## Prerequisites
21
21
22
-
* An active Azure subscription. [Create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22
+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23
23
24
-
> [!NOTE]
25
-
> Private endpoints require your App Service plan to meet specific requirements. For more information, see [Using Private Endpoints for Azure Web App](../../app-service/networking/private-endpoint.md).
26
-
> This feature is not supported with App Service Slots.
24
+
::: zone pivot="front-door-portal"
25
+
26
+
- An Azure Front Door Premium profile with an origin group. For more information, see [Create an Azure Front Door - CLI](../create-front-door-portal.md).
27
+
28
+
- A Private Link. For more information, see [Create a Private Link service](../../private-link/create-private-link-service-portal.md).
29
+
30
+
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
31
+
32
+
::: zone-end
33
+
34
+
::: zone pivot="front-door-cli"
27
35
28
-
## Sign in to Azure
36
+
- An Azure Front Door Premium profile with an origin group. For more information, see [Create an Azure Front Door - CLI](../create-front-door-cli.md).
29
37
30
-
Sign in to the [Azure portal](https://portal.azure.com).
38
+
- A Private Link. For more information, see [Create a Private Link service](../../private-link/create-private-link-service-cli.md).
39
+
40
+
- Azure Cloud Shell or Azure CLI.
41
+
42
+
The steps in this article run the Azure CLI commands interactively in [Azure Cloud Shell](/azure/cloud-shell/overview). To run the commands in the Cloud Shell, select **Open Cloud Shell** at the upper-right corner of a code block. Select **Copy** to copy the code, and paste it into Cloud Shell to run it. You can also run the Cloud Shell from within the Azure portal.
43
+
44
+
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. If you run Azure CLI locally, sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
45
+
46
+
::: zone-end
47
+
48
+
> [!NOTE]
49
+
> Private endpoints require your App Service plan to meet specific requirements. For more information, see [Using Private Endpoints for Azure Web App](../../app-service/networking/private-endpoint.md). This feature is not supported with App Service Slots.
31
50
32
51
## Enable Private Link to an App Service (Web App or Function App) in Azure Front Door Premium
33
52
53
+
::: zone pivot="front-door-portal"
54
+
34
55
In this section, you map the Private Link service to a private endpoint within Azure Front Door's private network.
35
56
36
57
1. In your Azure Front Door Premium profile, go to *Settings* and select **Origin groups**.
@@ -59,8 +80,37 @@ In this section, you map the Private Link service to a private endpoint within A
59
80
60
81
1. Select **Add** to save your configuration, then select **Update** to save the origin group settings.
61
82
83
+
::: zone-end
84
+
85
+
::: zone pivot="front-door-cli"
86
+
87
+
Use the [az afd origin create](/cli/azure/afd/origin#az-afd-origin-create) command to create a new Azure Front Door origin. The `private-link-location` value must be from the [available regions](../private-link.md#region-availability) and the `private-link-sub-resource-type` value is **sites**.
88
+
89
+
```azurecli-interactive
90
+
az afd origin create --enabled-state Enabled \
91
+
--resource-group 'myResourceGroup' \
92
+
--origin-group-name 'og1' \
93
+
--origin-name 'myapporigin' \
94
+
--profile-name 'contosoAFD' \
95
+
--host-name 'example.contoso.com' \
96
+
--origin-host-header 'example.contoso.com' \
97
+
--http-port 80 \
98
+
--https-port 443 \
99
+
--priority 1 \
100
+
--weight 500 \
101
+
--enable-private-link true \
102
+
--private-link-location 'EastUS' \
103
+
--private-link-request-message 'AFD app service origin Private Link request.' \
## Approve Azure Front Door Premium private endpoint connection from App Service
63
111
112
+
::: zone pivot="front-door-portal"
113
+
64
114
1. Navigate to the App Service you configured with Private Link in the previous section. Under **Settings**, select **Networking**.
65
115
66
116
1. In the **Networking** section, select on **Configure your private endpoint connections**.
@@ -69,15 +119,33 @@ In this section, you map the Private Link service to a private endpoint within A
69
119
70
120
1. Find the *pending* private endpoint request from Azure Front Door Premium and select **Approve**.
71
121
72
-
1. After approval, the connection status will update. It can take a few minutes for the connection to fully establish. Once established, you can access your web app or function app through Azure Front Door Premium. Direct access to the app from the public internet is disabled once private endpoint is enabled.
122
+
::: zone-end
73
123
74
-
## Common mistakes to avoid
124
+
::: zone pivot="front-door-cli"
125
+
126
+
1. Use the [az network private-endpoint-connection list](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-list) command to list the private endpoint connections for your web app. Note the `Resource ID` of the private endpoint connection on the first line of the output.
127
+
128
+
```azurecli-interactive
129
+
az network private-endpoint-connection list --name 'webapp1' --resource-group 'myResourceGroup' --type 'Microsoft.Web/sites'
130
+
```
75
131
76
-
The following are common mistakes when configuring an origin with Azure Private Link enabled:
132
+
1. Use the [az network private-endpoint-connection approve](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-approve) command to approve the private endpoint connection.
133
+
134
+
```azurecli-interactive
135
+
az network private-endpoint-connection approve --id '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/webapp1/privateEndpointConnections/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
136
+
```
137
+
138
+
::: zone-end
139
+
140
+
It can take a few minutes for the connection to fully establish after approval. Once established, you can access your web app or function app through Azure Front Door Premium. Direct access to the app from the public internet is disabled once private endpoint is enabled.
141
+
142
+
## Common mistakes to avoid
77
143
78
-
* Adding the origin with Azure Private Link enabled to an existing origin group that contains public origins. Azure Front Door doesn't allow mixing public and private origins in the same origin group.
144
+
The following is a common mistake when configuring an origin with Azure Private Link enabled:
79
145
146
+
- Adding the origin with Azure Private Link enabled to an existing origin group that contains public origins. Azure Front Door doesn't allow mixing public and private origins in the same origin group.
80
147
81
-
## Next steps
148
+
## Related content
82
149
83
-
Learn about [Private Link service with App service](../../app-service/networking/private-endpoint.md).
150
+
- [Connect Azure Front Door Premium to an Azure Application Gateway with Private Link](../how-to-enable-private-link-application-gateway.md)
151
+
- [Use private endpoints for Azure App Service apps](../../app-service/networking/private-endpoint.md)
0 commit comments