All Products
Search
Document Center

HTTPDNS:AddDomain

Last Updated:Dec 30, 2025

Adds a domain name.

Debug

You can call this operation directly in OpenAPI Explorer to simplify debugging. After a successful call, OpenAPI Explorer automatically calculates signatures and generates sample code for different SDKs.

Request parameters

Name

Type

Required

Example

Description

Action

String

Yes

AddDomain

A required parameter. Set the value to AddDomain.

AccountId

String

No

123456

The ID of the HTTPDNS account.

DomainName

String

Yes

www.example.com

The domain name.

Returned data

Name

Type

Example

Description

DomainName

String

www.example.com

The domain name.

RequestId

String

ADA27798-6911-4B06-AF34-53F62F62XXXX

The request ID.

Examples

Sample request

http(s)://httpdns-api.aliyuncs.com/?Action=AddDomain
&DomainName=www.aliyun.com
&<Common request parameters>

Sample response

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version='1.0' encoding='UTF-8'?>
<AddDomainResponse>
    <RequestId>ADA27798-6911-4B06-AF34-53F62F624D7B</RequestId>
    <DomainName>www.aliyun.com</DomainName>
</AddDomainResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "ADA27798-6911-4B06-AF34-53F62F624D7B",
  "DomainName" : "www.aliyun.com"
}

Error codes

For a list of error codes, see the Error Center.