Share via


AFD Profiles - Check Host Name Availability

Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability?api-version=2025-04-15

URI Parameters

Name In Required Type Description
profileName
path True

string

minLength: 1
maxLength: 260
pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$

Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
hostName True

string

The host name to validate.

Responses

Name Type Description
200 OK

CheckNameAvailabilityOutput

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Azure Front Door error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

AFDProfiles_CheckHostNameAvailability

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/checkHostNameAvailability?api-version=2025-04-15

{
  "hostName": "www.someDomain.net"
}

Sample response

{
  "nameAvailable": false,
  "reason": "Conflict",
  "message": "The hostname 'www.someDomain.net' is already owned by another profile."
}

Definitions

Name Description
CheckHostNameAvailabilityInput

Input of CheckHostNameAvailability API.

CheckNameAvailabilityOutput

Output of check name availability API.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

CheckHostNameAvailabilityInput

Input of CheckHostNameAvailability API.

Name Type Description
hostName

string

The host name to validate.

CheckNameAvailabilityOutput

Output of check name availability API.

Name Type Description
message

string

The detailed error message describing why the name is not available.

nameAvailable

boolean

Indicates whether the name is available.

reason

string

The reason why the name is not available.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.