Skip to content

Commit f561a5e

Browse files
committed
fixes to code
1 parent 20f2f56 commit f561a5e

File tree

1 file changed

+58
-67
lines changed

1 file changed

+58
-67
lines changed

articles/dns/dns-web-sites-custom-domain.md

Lines changed: 58 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: dns
55
author: asudbring
66
ms.service: azure-dns
77
ms.topic: tutorial
8-
ms.date: 08/03/2025
8+
ms.date: 08/04/2025
99
ms.author: allensu
1010
ms.custom: devx-track-azurepowershell
1111
#Customer intent: As an experienced network administrator, I want to create DNS records in Azure DNS, so I can host a web app in a custom domain.
@@ -117,8 +117,14 @@ az webapp show \
117117

118118
# [Portal](#tab/azure-portal)
119119

120-
1. Navigate to your DNS zone in the Azure portal.
121-
1. Select **+ Record set**.
120+
1. In the search box at the top of the portal, enter **DNS zones**, and select it from the results.
121+
122+
1. Select your DNS zone from the list.
123+
124+
1. Select **+ Record sets** at the top of the **Overview** page of your DNS zone.
125+
126+
1. Select **+ Add**.
127+
122128
1. On the **Add record set** page, enter the following information:
123129

124130
| Setting | Value |
@@ -129,7 +135,7 @@ az webapp show \
129135
| **TTL unit** | **Seconds** |
130136
| **IP address** | Enter the IP address of your web app (copied from the previous step) |
131137

132-
1. Select **OK** to create the record.
138+
1. Select **Add** to create the record.
133139

134140
# [PowerShell](#tab/azure-powershell)
135141

@@ -177,12 +183,18 @@ az network dns record-set a add-record \
177183
App Services uses this record only at configuration time to verify that you own the custom domain. You can delete this TXT record after your custom domain is validated and configured in App Service.
178184

179185
> [!NOTE]
180-
> If you want to verify the domain name, but not route production traffic to the web app, you only need to specify the TXT record for the verification step. Verification does not require an A or CNAME record in addition to the TXT record.
186+
> If you want to verify the domain name, but not route production traffic to the web app, you only need to specify the TXT record for the verification step. Verification does not require an A or CNAME record in addition to the TXT record.
181187
182188
# [Portal](#tab/azure-portal)
183189

184-
1. Navigate to your DNS zone in the Azure portal.
185-
1. Select **+ Record set**.
190+
1. In the search box at the top of the portal, enter **DNS zones**, and select it from the results.
191+
192+
1. Select your DNS zone from the list.
193+
194+
1. Select **+ Record sets** at the top of the **Overview** page of your DNS zone.
195+
196+
1. Select **+ Add**.
197+
186198
1. On the **Add record set** page, enter the following information:
187199

188200
| Setting | Value |
@@ -193,7 +205,7 @@ App Services uses this record only at configuration time to verify that you own
193205
| **TTL unit** | **Seconds** |
194206
| **Value** | Enter your web app's default domain name (for example, **contoso.azurewebsites.net**) |
195207

196-
1. Select **OK** to create the record.
208+
1. Select **Add** to create the record.
197209

198210
# [PowerShell](#tab/azure-powershell)
199211

@@ -231,8 +243,14 @@ If your domain is already managed by Azure DNS (see [DNS domain delegation](dns-
231243

232244
# [Portal](#tab/azure-portal)
233245

234-
1. Navigate to your DNS zone in the Azure portal.
235-
1. Select **+ Record set**.
246+
1. In the search box at the top of the portal, enter **DNS zones**, and select it from the results.
247+
248+
1. Select your DNS zone from the list.
249+
250+
1. Select **+ Record sets** at the top of the **Overview** page of your DNS zone.
251+
252+
1. Select **+ Add**.
253+
236254
1. On the **Add record set** page, enter the following information:
237255

238256
| Setting | Value |
@@ -243,7 +261,7 @@ If your domain is already managed by Azure DNS (see [DNS domain delegation](dns-
243261
| **TTL unit** | **Seconds** |
244262
| **Alias** | Enter your web app's default domain name (for example, **contoso.azurewebsites.net**) |
245263

246-
1. Select **OK** to create the record.
264+
1. Select **Add** to create the record.
247265

248266
# [PowerShell](#tab/azure-powershell)
249267

@@ -259,35 +277,16 @@ $cnameRecordParams = @{
259277
New-AzDnsRecordSet @cnameRecordParams
260278
```
261279

262-
The following example is the response:
263-
264-
```
265-
Name : www
266-
ZoneName : contoso.com
267-
ResourceGroupName : myazureresourcegroup
268-
Ttl : 600
269-
Etag : 8baceeb9-4c2c-4608-a22c-229923ee185
270-
RecordType : CNAME
271-
Records : {contoso.azurewebsites.net}
272-
Tags : {}
273-
```
274-
275280
# [Azure CLI](#tab/azure-cli)
276281

277282
```azurecli
278-
# Create the CNAME record set
279-
az network dns record-set cname create \
280-
--resource-group test-rg \
281-
--zone-name contoso.com \
282-
--name "www" \
283-
--ttl 600
284-
285-
# Add the CNAME record
286-
az network dns record-set cname add-record \
283+
# Create the CNAME record
284+
az network dns record-set cname set-record \
287285
--resource-group test-rg \
288286
--zone-name contoso.com \
289287
--record-set-name "www" \
290-
--cname "contoso.azurewebsites.net"
288+
--cname "contoso.azurewebsites.net" \
289+
--ttl 600
291290
```
292291

293292
---
@@ -334,17 +333,36 @@ contoso.com text =
334333

335334
## Add custom host names
336335

337-
Now, you can add the custom host names to your web app:
336+
Add the custom host names to your web app:
338337

339338
# [Portal](#tab/azure-portal)
340339

341-
1. Navigate to your web app in the Azure portal.
342-
1. In the left navigation under **Settings**, select **Custom domains**.
340+
1. In the search box at the top of the portal, enter **App Services**, and select it from the results.
341+
342+
1. Select your web app from the list.
343+
344+
1. Expand **Settings** in the left navigation, then select **Custom domains**.
345+
343346
1. Select **+ Add custom domain**.
344-
1. In the **Custom domain** field, enter your domain name (for example, **contoso.com** or **www.contoso.com**).
347+
348+
1. In **+ Add custom domain** dialog, enter the following information:
349+
350+
| Setting | Value |
351+
|---------|-------|
352+
| Domain provider | Select **All other services** |
353+
| TLS/SSL certificate | Select **None** (you can add a TLS/SSL certificate later) |
354+
| TLS/SSL type | Select **SNI SSL** |
355+
| Domain | Enter your domain name (for example, **contoso.com**) |
356+
357+
The domain validation will see the records you created in the previous steps.
358+
345359
1. Select **Validate**. Azure will validate that the DNS records you created are properly configured.
346-
1. If validation is successful, select **Add custom domain**.
347-
1. Repeat steps 3-6 for each custom domain you want to add (both **contoso.com** and **www.contoso.com**).
360+
361+
1. Select **Add**.
362+
363+
1. The domain you added is now listed in the **Custom domains** section.
364+
365+
1. Repeat steps 3-8 for each custom domain you want to add (both **contoso.com** and **www.contoso.com**).
348366

349367
# [PowerShell](#tab/azure-powershell)
350368

@@ -385,33 +403,6 @@ You should see the same page for both URLs. For example:
385403

386404
:::image type="content" source="./media/dns-web-sites-custom-domain/contoso-web-app.png" alt-text="Screenshot of the contoso Azure App Service Web App accessed via web browser.":::
387405

388-
## Clean up resources
389-
390-
When no longer needed, you can delete all resources created in this tutorial by deleting the resource group **test-rg**:
391-
392-
# [Portal](#tab/azure-portal)
393-
394-
1. On the Azure portal menu, select **Resource groups**.
395-
1. Select the **test-rg** resource group.
396-
1. On the **Overview** page, select **Delete resource group**.
397-
1. Enter *test-rg* and select **Delete**.
398-
399-
# [PowerShell](#tab/azure-powershell)
400-
401-
```azurepowershell
402-
$resourceGroupParams = @{
403-
Name = "test-rg"
404-
Force = $true
405-
}
406-
Remove-AzResourceGroup @resourceGroupParams
407-
```
408-
409-
# [Azure CLI](#tab/azure-cli)
410-
411-
```azurecli
412-
az group delete --name test-rg --yes --no-wait
413-
```
414-
415406
---
416407

417408
## Next steps

0 commit comments

Comments
 (0)