question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set custom domain for app service

See original GitHub issue

Library name and version

Azure.ResourceManager.AppService

Query/Question

How do I add a custom domain to an app service?

The corresponding URL in the Azure portal is: https://portal.azure.com/<my>.onmicrosoft.com/resource/subscriptions/<id>/resourceGroups/<resource group>/providers/Microsoft.Web/sites/<app name>/domainsandssl

Environment

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mcgallancommented, May 9, 2022

@joostmeijles Thank you for your feedback. I’m sorry to reply to you after such a long time. For the two questions you mentioned, 1.You can add a DNS record as follows: image in AppServiceDomainData, there is ManagedHostNames image for HostName, image 2.For how to create a SSL binding for a certain subdomain on your app service, you could refer to this ArmClient client = new ArmClient(new DefaultAzureCredential()); var subscription = (await client.GetSubscriptions().GetAsync(“subid”)).Value; var resourceGroup = (await subscription.GetResourceGroups().GetAsync(“appservicetest”)).Value; var website = (await resourceGroup.GetWebSiteAsync(“28168”)).Value;

var bindingCollection = website.GetSiteHostNameBindings(); var data = new HostNameBindingData() { SiteName = “SiteName”, DomainId = “Domain Id”, AzureResourceName = “ResourceName”, AzureResourceType = Azure.ResourceManager.AppService.Models.AzureResourceType.Website, CustomHostNameDnsRecordType = Azure.ResourceManager.AppService.Models.CustomHostNameDnsRecordType.CName, HostNameType = Azure.ResourceManager.AppService.Models.HostNameType.Verified, SslState = Azure.ResourceManager.AppService.Models.SslState.IPBasedEnabled, Thumbprint = “Thumbprint”, }; var binding = (await bindingCollection.CreateOrUpdateAsync(Azure.WaitUntil.Completed, “hostname”, data).ConfigureAwait(false)).Value; I hope my reply can help you

1reaction
jsquirecommented, Apr 12, 2022

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure custom domain suffix for App Service Environment
From the Azure portal, navigate to the Custom domain suffix page for your App Service Environment. · Enter your custom domain name. ·...
Read more >
Adding a custom domain to Azure App Service
How to add a custom domain in Azure. First, let's open our App Service and click the Custom domains option on the left....
Read more >
Setup Custom Domain for Azure App Service - Parveen Singh
Navigate to Azure Portal and locate your App Service resource. Click on the "Custom Domains" option on the left blade and click "+...
Read more >
app-service-web-tutorial-custom-domain.md
In the Azure portal, navigate to your app's management page. · In the left menu for your app, select Custom domains. · Select...
Read more >
Zero to Hero with App Service, Part 5: Add and Secure a ...
Go to your App Service and navigate to the “Custom domain” section under “Settings”. · Click on the “Add custom domain” button ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found