# DNS API

{% hint style="info" %}
Domain names can be onboarded through DNS settings, utilizing the DNS ACME Challenge for certificate issuance, and supporting Wildcard certificate requests. The domain must be hosted with the DNS provider; please refer to the DNS provider's documentation for the specific procedures.
{% endhint %}

### How to Set Up DNS API?

* Navigate to Sites -> Sites Settings -> Site Settings -> DNS API -> Create DNS API

<figure><img src="/files/K3shMOcW8JNXctwrM40O" alt=""><figcaption></figcaption></figure>

* **Name**: Customizable Name
* **Supported Providers**: Aliyun, Cloudflare, DNSPod, HuaweiCloud, GoDaddy. Click on the DNS provider you want to integrate with.

<figure><img src="/files/4j3JqxK0WDA90Sc4hc0c" alt=""><figcaption></figcaption></figure>

***

### Configuring DNS API with GoDaddy:

* Ensure Domain Hosting: First, confirm that the domain is hosted with GoDaddy.

* Log into GoDaddy API:

  * Navigate to API Keys.
  * Click on Create API Key.

  <figure><img src="/files/oNicR9SJi5QWp2P7v8QO" alt=""><figcaption></figcaption></figure>

* The Name (Optional) can be customized or left blank, the Environment is generally set to Production, then click Next.<br>

  <figure><img src="/files/cR7maYnjvqzDyjb1eJGw" alt=""><figcaption></figcaption></figure>

* Next, the Key and Secret will appear; make sure to record them.<br>

  <figure><img src="/files/8NyFM73PlvevA882sxlv" alt=""><figcaption></figcaption></figure>

* Return to the CDN platform:

* Sites -> Sites Settings -> Site Settings -> DNS API -> Create DNS API -> Select GoDaddy as the DNS type.

* Enter the Key and Secret provided by GoDaddy, then click "Add".<br>

  <figure><img src="/files/M9uYFEjmD1npyb1Ed0FX" alt=""><figcaption></figcaption></figure>

* Navigate to Domains -> Select the Wildcard Domain for Certificate Application.

* Check "Auto SSL" and "Apply for a Certificate Using DNS Verification".

* Go to DNS API Settings and select the configuration just added.

* Finally, click Confirm and wait for the certificate application to complete.

  <figure><img src="/files/qAFTZysWZQwkIlAlvzi9" alt=""><figcaption></figcaption></figure>

***

### Configuring DNS API with Cloudflare:

* Ensure Domain Hosting: First, confirm that the domain is hosted with Cloudflare's DNS.

* Log into Cloudflare

* Click on the top-right corner -> My Profile.<br>

  <figure><img src="/files/EqFYJpGlIp8v1RhUmW1p" alt=""><figcaption></figcaption></figure>

* From the left-hand menu, click on API Tokens.

* In the center of the screen, click Create Token.<br>

  <figure><img src="/files/qj0j2eAGss40MQvEItwq" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/lRMSy577z0t3R541U52R" alt=""><figcaption></figcaption></figure>

* Find Edit zone DNS, click on Template.

* Under Zone Resources, select the domain for which you want to apply.

* Click Continue to Summary -> Create Token.

* After the token is generated, copy it down.<br>

  <figure><img src="/files/gbuDCOLa4SMj43Vr9EsO" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/lAPwertqo4wNp7mh65GQ" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/PspwbyuOMhNXvq6IfMKu" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/mEKvTrxQKbRAtPHn4rVC" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/3pDCDi8O9xLaS70V5YFs" alt=""><figcaption></figcaption></figure>

* Return to the CDN platform:

* Sites -> Sites Settings -> Site Settings -> DNS API -> Create DNS API -> Select Cloudflare as the DNS type.

* Paste the copied Token into the API Token field.<br>

  <figure><img src="/files/8XyMTNN38bNWUaYEH6FC" alt=""><figcaption></figcaption></figure>

* Navigate to Domains -> Select the Wildcard Domain for Certificate Application.

* Check "Auto SSL" and "Apply for a Certificate Using DNS Verification".

* Go to DNS API Settings and select the configuration just added.

* Finally, click Confirm and wait for the certificate application to complete.

  <figure><img src="/files/qAFTZysWZQwkIlAlvzi9" alt=""><figcaption></figcaption></figure>

***

### Configuring DNS API with Huawei Cloud<br>

* Ensure Domain Name Management: First, confirm that the domain name has been delegated to Huawei DNS.
* Log into Huawei Cloud: Access your Huawei Cloud account.
* Navigate to DNS Service: Click on the top left corner and select "Domain Name Service".<br>

  <figure><img src="/files/oAv5DA81F3j8HHDHimKj" alt=""><figcaption></figcaption></figure>
* Here, we need to configure the domain name for which you want to apply for a certificate. For example, to apply for \*.abc.com, you should set abc.com.<br>

  <figure><img src="/files/cKXxAQ6I5CKkkKanbtop" alt=""><figcaption></figcaption></figure>
* Next, you need to obtain an Access Key ID. Move your mouse to the top right corner, and from the dropdown menu, click on "My Credentials".<br>

  <figure><img src="/files/qxhmjwwrhgWGFQ6lACSV" alt=""><figcaption></figcaption></figure>
* Click on Create New Access Key.<br>

  <figure><img src="/files/tgWOZJdwOTICmMAfuYKl" alt=""><figcaption></figcaption></figure>
* After creation, download the key. The content of the downloaded file will display the Access Key ID and Secret Access Key. These must be securely stored.<br>

  <figure><img src="/files/I51E5G25wucgjt9XAE8O" alt=""><figcaption></figcaption></figure>
* eturn to the CDN Platform:
* Sites -> Sites Settings -> Site Settings -> DNS API -> Create DNS API
* Choose HuaweiCloud as the DNS Type.
* Enter the Access Key and Secret Access Key you obtained.
* For Region ID, select China-Hong Kong unless specified otherwise.<br>

  <figure><img src="/files/S4AtMHyLt4wYj0lww3BJ" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/d6NvIcp7HsVCSedQm9TS" alt=""><figcaption></figcaption></figure>
* Navigate to Domains -> Select the Wildcard Domain for Certificate Application.
* Check "Auto SSL" and "Apply for a Certificate Using DNS Verification".
* Go to DNS API Settings and select the configuration just added.
* Finally, click Confirm and wait for the certificate application to complete.

  <figure><img src="/files/lXYtHk7sMzBaneCU8nh9" alt=""><figcaption></figcaption></figure>

***

### Configuring DNS API with **Ali Cloud**

* First, ensure that the domain name is hosted on Ali Cloud.
* Log in to Ali Cloud.
* Click on the top right corner and select "AccessKey".
* Click on "Create AccessKey".
* Securely save the generated AccessKey ID and AccessKey Secret.<br>

  <figure><img src="/files/0xCapG0kIs9v7l16TYbK" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/wlHhqVDbj1AqFxePfMw4" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/ADf8MssWoAPAFP0GW6fC" alt=""><figcaption></figcaption></figure>
* Return to the CDN platform.
* Navigate to Sites -> Sites Settings -> Site Settings -> DNS API -> Creat DNS API.
* For DNS Type, select Ali Cloud DNS. &#x20;
* Enter the AccessKey ID and AccessKey Secret that were just created, then click Add.<br>

  <figure><img src="/files/ycZZOnj0b4uFqSbemPfQ" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/h7HxAa5x5JyZ3HIzprUJ" alt=""><figcaption></figcaption></figure>
* Go to Domain Management -> Select the wildcard domain for which you want to apply for a certificate.
* Check the boxes for "Auto SSL" and "Apply for a Certificate Using DNS Verification".
* In the DNS API Settings, choose the configuration you added earlier.
* Finally, click Confirm and wait for the certificate application to complete.

<figure><img src="/files/19ZsyR1a0un8j0UQkfEr" alt=""><figcaption></figcaption></figure>

***

### Configuring DNS API with **DNSPod**

* First, ensure that the domain name is hosted on DNSPod.
* Log in to DNSPod.
* Click on the top right corner and select "AccessKey".
* Click on "Create AccessKey".
* Securely save the generated AccessKey ID and AccessKey Secret.

  <figure><img src="/files/sxXAYRlJC1PPQaLuh3Lh" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/Rl8PDccEs4qpKD8vXvDC" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/h2Xy7wB9bdcFmZEgh2SE" alt=""><figcaption></figcaption></figure>
* Return to the CDN platform:
* Sites -> Sites Settings -> Site Settings -> DNS API -> Create DNS API -> Select DNSPod as the DNS type.
* Paste the copied Token into the API Token field.

  <figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7vxHqCVLLhkQflU2CjRu%2Fuploads%2FU533hlYK2lSkLC3eVA83%2Fimage.png?alt=media&#x26;token=cebc62a5-34e8-4524-87f4-472eeb8037d8" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/pSEWgYMFG44mqgbFwDQn" alt=""><figcaption></figcaption></figure>
* Go to Domain Management -> Select the wildcard domain for which you want to apply for a certificate.
* Check the boxes for "Auto SSL" and "Apply for a Certificate Using DNS Verification".
* In the DNS API Settings, choose the configuration you added earlier.
* Finally, click Confirm and wait for the certificate application to complete.<br>

  <figure><img src="/files/mwF9jRKyVpDecIiMfrwB" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.user.cdnray.net/en/site-settings/dns-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
