Share via

Error creating Azure app service managed certificate

Cameron Langsford 21 Reputation points
2021-04-13T02:48:11+00:00

In the Azure portal I'm trying to create an app managed certificate for a new domain.

I have successfully created top level naked certificates before without any issues.

This is the error

Properties.CanonicalName is invalid. Canonical name flexfitnessmount.co.nz is not a subdomain. This validation method only supports subdomains.

I think this error is not quite right as it's obvious that this is not a sub domain so I don't known why it is trying to use a validation method that only supports a sub domain in this case.

I wonder because it's .co.nz instead of .com it's getting confused and the extra part of the domain is causing it to think it should be validating a sub domain.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

Answer accepted by question author

Grmacjon-MSFT 19,511 Reputation points Moderator
2021-04-13T22:08:36.217+00:00

Hi @Cameron Langsford ,

Can you please try this Powershell script:

$subscription = "SUBSCRIPTION-ID"  
  $resourceGroupName = "RESOURCE-GROUP-NAME"  
  $appServicePlanName = "APP-SERVICE-PLAN-NAME"  
  $subjectName = "DOMAIN-NAME"  
          
  Set-AzureRmContext -SubscriptionId $subscription  
          
  $appServicePlan = Get-AzureRmResource `  
      | Where-Object {$_.ResourceGroupName -eq $resourceGroupName } `  
      | Where-Object {$_.Name -eq $appServicePlanName}  
          
  New-AzureRMResourceGroupDeployment `  
      -ResourceGroupName $resourceGroupName `  
      -SubjectName $subjectName `  
      -AppServicePlanName $appServicePlanName `  
      -Location $appServicePlan.Location `  
      -TemplateFile "CreateHttpFreeCert.json"   

This script will only create an App Service Managed Certificate for a custom domain that has already been added to your web app. If you run this script before adding a custom domain to the web app, the script will fail.

Thanks,
Grace

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.