12

I am trying to create application gateway with custom domain name, I keep getting error saying "cannot have Domain Name Label specified."

I was wondering if I am doing something wrong or it's not possible for azure application gateway to have custom domain name ?

3 Answers 3

14

Here are my lessons learned regarding the azure application gateway:

1.) Application gateway does _not_ support statically addressed public IPs
2.) Application gateway does _not_ support public IPs with a DNS name (e.g. somename.cloudapp.net)
3.) The application gateway’s DNS name _should_ be used to create a CNAME record which points to a friendly DNS (i.e. myawesomesite.com)
4.) The use of an A-record is _not_ recommended because the VIP may change on restart of the application gateway

Run this powershell script to get the gateway DNS:

Login-AzureRmAccount
Set-AzureRmContext -SubscriptionName '<Azure Subscription Name>'

$resourceGroup = 'myresourcegroup'
$pubIpName     = 'mypubip'

Get-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Name $pubIpName

Look for something like this in what's returned from the script above:

DnsSettingsText: {
    "Fqdn": "00000000-1111-2222-3333-444444444444.cloudapp.net"
}

The fqdn is what you'll use to setup your CNAME.

7

It's not supported, you cannot setup a custom DNS Name, i have opened a ticket with microsoft support department.

You will have a DNS name like: 12-232-4-334-2-34-2343.cloudapp.net, you can use a CNAME for example, making www.web.com go to 12-232-4-334-2-34-2343.cloudapp.net .

PD: also, the public IP must be dynamic FYI.

2
  • 3
    This is true and is the worst thing in existence.
    – adamwtiko
    Sep 21, 2016 at 14:44
  • I am wondering why Microsoft is doing that? For preventing the DDOS attack?
    – Allen
    Aug 10, 2018 at 4:51
1

If you have only one Application listening on the Application Gateway, add the custom URL (that you wanted to attach with Gateway as a custom domain, for example, customurl.example.com) in the custom domains of the Web App. When you've added that, Add a DNS Entry so that this custom URL (customurl.example.com) points to your App Gateway's DNS name (something.cloupapp.net). That way, when you hit the custom URL(customurl.example.com), it would be redirected to your app, passing through the Application Gateway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.