Skip to content

Commit 85c0a96

Browse files
committed
fixes to code blocks
1 parent 52a58f1 commit 85c0a96

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,41 @@ An A record is used to map a name to its IP address. In the following example, a
8484

8585
### Get the IPv4 address
8686

87+
# [Portal](#tab/azure-portal)
88+
8789
In the left navigation of the App Services page in the Azure portal, select **Custom domains**, then copy the IP address of your web app:
8890

8991
:::image type="content" source="./media/dns-web-sites-custom-domain/app-service-custom-domains.png" alt-text="Screenshot of Azure App Service Custom domains page showing the web app IP address.":::
9092

93+
# [PowerShell](#tab/azure-powershell)
94+
95+
To get the IP address of your web app, use:
96+
97+
```azurepowershell
98+
$webAppParams = @{
99+
Name = "contoso"
100+
ResourceGroupName = "<your web app resource group>"
101+
}
102+
$webApp = Get-AzWebApp @webAppParams
103+
$inboundIpAddress = $webApp.InboundIpAddress
104+
Write-Output "Web app inbound IP address: $inboundIpAddress"
105+
```
106+
107+
# [Azure CLI](#tab/azure-cli)
108+
109+
To get the IP address of your web app, use:
110+
111+
```azurecli
112+
# Get the inbound IP address
113+
az webapp show \
114+
--name contoso \
115+
--resource-group <your web app resource group> \
116+
--query "inboundIpAddress" \
117+
--output tsv
118+
```
119+
120+
---
121+
91122
### Create the record
92123

93124
# [Portal](#tab/azure-portal)

0 commit comments

Comments
 (0)