Issue trying to create a custom domain for my apim instance

Johan Lindahl 26 Reputation points

I have a strange issue when trying to create a custom domain for my azure apim instance, the custom domain that i configured seems to be okey, but the error message i receive when trying to save referes to the default domain created when we setup the apim instance.

Any ideas on what could be wrong ?

See error message below

    "subStatus": {
        "value": "BadRequest",
        "localizedValue": "Bad Request (HTTP Status Code: 400)"
    "properties": {
        "statusCode": "BadRequest",
        "serviceRequestId": null,
        "statusMessage": "{"error":{"code":"InvalidParameters",
                       "message":"Invalid parameter: CustomHostnameOwnershipCheckFailed. DNS name '<my-apim-service-name> ' contains an invalid character."}}",
        "eventCategory": "Administrative",
        "message": "Microsoft.ApiManagement/service/write"
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,724 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 67,986 Reputation points

    @Johan Lindahl Thanks for reaching out. As per the error it looks like there was an issue with the DNS configuration value. Can you please confirm if you are not using the invalid character while setting the DNS configuration on your APIM instance. Looks like you might be using https:// or http:// or other invalid character on the configuration. Please share the configuration blade screenshot of your APIM instance so I can validate it.

0 additional answers

Sort by: Most helpful