Calls the DescribeDomainNs operation to query the list of name servers configured for a domain name and check whether all the name servers are Alibaba Cloud DNS servers based on the specified domain name.

Note This operation queries the authoritative server of the registry to obtain the name servers of a domain name. If the domain name is in the serverHold or clientHold state, an exception may occur.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDomainNs

The operation that you want to perform. Set the value to DescribeDomainNs.

DomainName String Yes example.com

The domain name.

Lang String No en

The language type.

Response parameters

Parameter Type Example Description
AllAliDns Boolean true

Indicates whether all the name servers were Alibaba Cloud DNS servers.

DnsServers List vip1.alidns.com,vip2.alidns.com

The list of DNS servers for the domain name.

DnsServer

Details about a DNS server for the domain name.

ExpectDnsServers List x1.alidns.com,x2.alidns.com

The list of DNS servers assigned by Alibaba Cloud.

ExpectDnsServer

Details about a DNS server assigned by Alibaba Cloud.

IncludeAliDns Boolean true

Indicates whether the name servers included Alibaba Cloud DNS servers.

RequestId String 16C7DC7A-2FA7-4D14-8B12-88A2BB6373DB

The ID of the request.

Examples

Sample requests


http(s)://alidns.aliyuncs.com/?Action=DescribeDomainNs
&DomainName=example.com
&<Common request parameters>

Sample success responses

XML format

<DescribeDomainNsResponse>
      <RequestId>16C7DC7A-2FA7-4D14-8B12-88A2BB6373DB</RequestId>
      <AllAliDns>true</AllAliDns>
      <DnsServers>
            <DnsServer>vip1.alidns.com</DnsServer>
            <DnsServer>vip2.alidns.com</DnsServer>
      </DnsServers>
      <IncludeAliDns>true</IncludeAliDns>
</DescribeDomainNsResponse>

JSON format

{
	"RequestId":"16C7DC7A-2FA7-4D14-8B12-88A2BB6373DB",
	"AllAliDns":true,
	"IncludeAliDns":true,
	"DnsServers":{
		"DnsServer":[
			"vip1.alidns.com",
			"vip2.alidns.com"
		]
	}
}

Error codes

For a list of error codes, visit the API Error Center.