All Products
Document Center

Bind a domain name

Last Updated: Dec 18, 2017


This function is for binding a custom domain name to a specified API group.

  • This function is intended for API providers.
  • Requests can be sent to your backend services only after an independent domain name is filed successfully in Alibaba Cloud system. Filing and access processes
  • You must resolve the CNAME of the independent domain name to the group’s second-level domain name, and then bind the independent domain name to the group. Otherwise, the system returns an error during the binding operation.
  • To bind an independent domain name of another group to the current group, you must change the resolution of the independent domain name and then bind it to the current group.
  • If the HTTPS protocol is used, you must also bind the SSL certificate and transfer the CertificateName, CertificateBody, and PrivateKey input parameters.
  • You can upload the SSL certificate subsequently. For more information, see SetDomainCertificate.

Request parameters

Name Type Required? Description
Action String Yes Interface name, which is a required parameter; value: SetDomain.
GroupId String Yes API group ID, which is generated by the system and globally unique.
DomainName String Yes Custom domain name.
CertificateName String No SSL certificate name.
CertificateBody String No Certificate content.
PrivateKey String No Private key of the certificate.

Returned parameters

Name Type Description
RequestId String Unique request ID.
GroupID String API group ID, which is generated by the system and globally unique.
DomainName String Custom domain name.
SubDomain String Second-level domain name bound to the API group, which is used for API call testing.
DomainBindingStatus String Binding status of the custom domain name.
  • BINDING: The domain name is normal.
  • BOUND: The domain name does not take effect.
DomainLegalStatus String Domain legal status; values:
  • NORMAL: The domain is valid.
  • ABNORMAL: The domain is invalid, and the API is unavailable. You must fix it as soon as possible.
DomainRemark String Remark of the domain, such as the reason for abnormity.


Request example

  2. &GroupId=927d50c0f2e54b359919923d908bb015
  3. &
  4. &<Public request parameters>

Response example

XML format

  1. <SetDomainResponse>
  2. <RequestId>6EF60BEC-0242-43AF-BB20-270359FB54A7</RequestId>
  3. <GroupId>927d50c0f2e54b359919923d908bb015</GroupId>
  4. <DomainName></DomainName>
  5. <SubDomain></SubDomain>
  6. <DomainBindingStatus>BINDING</DomainBindingStatus>
  7. <DomainLegalStatus>NORMAL</DomainLegalStatus>
  8. <DomainRemark></DomainRemark>
  9. </SetDomainResponse>

JSON format

  1. {
  2. "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
  3. "GroupId": "927d50c0f2e54b359919923d908bb015",
  4. "DomainName": "",
  5. "SubDomain": "",
  6. "DomainBindingStatus": "BINDING",
  7. "DomainLegalStatus":"NORMAL",
  8. "DomainRemark":""
  9. }