Adds a domain name.
You can check whether a domain name is valid based on the following topic:
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddDomain |
The operation that you want to perform. Set the value to AddDomain. |
DomainName | String | Yes | 中文.com |
The domain name to be added. |
Lang | String | No | en |
The language of the domain name. |
GroupId | String | No | 2223 |
The ID of the domain name group. The default value is the ID of the default domain name group. |
ResourceGroupId | String | No | rg-resourcegroupid |
The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DnsServers | List | {"DnsServer": ["ns1.alidns.com","ns2.alidns.com"]} |
The Domain Name System (DNS) servers that resolve the domain name. |
DomainId | String | 00efd71a-770e-4255-b54e-6fe5659baffe |
The ID of the domain name. |
DomainName | String | 中文.com |
The domain name. |
GroupId | String | 2223 |
The ID of the domain name group. |
GroupName | String | MyGroup |
The name of the domain name group. |
PunyCode | String | xn--fsq270a.com |
The Punycode for the domain name. This parameter is returned only for Chinese domain names. |
RequestId | String | 536E9CAD-DB30-4647-AC87-AA5CC38C5382 |
The ID of the request. |
Examples
Sample requests
http(s)://alidns.aliyuncs.com/?Action=AddDomain
&DomainName=中文.com
&<Common request parameters>
Sample success responses
XML
format
<AddDomainResponse>
<RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
<DomainId>00efd71a-770e-4255-b54e-6fe5659baffe</DomainId>
<DomainName>中文.com</DomainName>
<GroupId>2223</GroupId>
<GroupName>MyGroup</GroupName>
<PunyCode>xn--fsq270a.com</PunyCode>
<DnsServers>
<DnsServer>dns1.hichina.com</DnsServer>
<DnsServer>dns2.hichina.com</DnsServer>
</DnsServers>
</AddDomainResponse>
JSON
format
{
"RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
"DomainId": "00efd71a-770e-4255-b54e-6fe5659baffe",
"DomainName": "中文.com",
"GroupId": "2223",
"GroupName": "MyGroup",
"PunyCode": "xn--fsq270a.com",
"DnsServers": {
"DnsServer": [
"ns1.alidns.com",
"ns2.alidns.com"
]
}
}
Error codes
For a list of error codes, visit the API Error Center.