# Add Domain

### How to Add a Domain?

* First, resolve the domain to the CNAME of the CDN site.
* Location of CNAME Display: Site Settings
* After the resolution is complete, click to add the domain.

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

### Basic Settings

* **Shared Origin:** When configuring a single or multiple domains, if more than one origin server provides the service, you can select this option.

  <figure><img src="/files/o4XeqUrFNVnT1cNm64dC" alt=""><figcaption></figcaption></figure>
* **Dedicated Origin:** When configuring a single or multiple domains, select this option if there is only one origin server.

  <figure><img src="/files/LI1UEMk3CejzdPRC3kVg" alt=""><figcaption></figcaption></figure>
* **Supports Internationalized Domain Names (IDN):** Non-English domain names can be entered directly without the need for Punycode conversion.<br>

  <figure><img src="/files/1aZpJegEieUgeEK83LnF" alt=""><figcaption></figcaption></figure>
* **Protocol**: The protocol used to pull content from the origin.
  * HTTP: Use HTTP to fetch content from the origin.
  * HTTPS: Use HTTPS to fetch content from the origin.
  * Follow Protocol: When enabled, the CDN will choose HTTP or HTTPS for fetching content from the origin based on the protocol used by the visitor. When this option is active, port mapping must also be enabled.
* **Port Map**: When enabled, the CDN will determine the origin port to fetch content from based on the port used by the visitor to access the CDN.
* **Tags**: You can add custom tags to domains for easier management.
* **Status**: Toggle to enable or disable the domain.<br>

{% hint style="danger" %}
When setting up domains and origins, any extra spaces can lead to a failure in adding them.
{% endhint %}

### SSL Management

* **Certificate Types:**
  * **Automatic Certificate Issuance:** Enable this option to automatically request a certificate. It will also renew automatically before expiration. You can choose a certificate provider (Let's Encrypt or ZeroSSL).
  * **Manual Certificate Configuration:** Click **"Add Certificate"** to upload and associate a certificate, completing the setup.
* **Force SSL**: Forces users to access your site via HTTPS.
* **Apply for a Certificate Using DNS Verification**: If you want to apply for automatic SSL for wildcard domains, you need to enable this feature.
* **DNS API Settings**: For detailed operations, please refer to <https://doc.user.cdnray.net/zhan-dian-she-zhi/dns-jie-ru>
* **Certificate**: If you have added your own certificates in the Module Management -> Certificates section, the related certificates will be displayed here.
* **Auto SSL Provider**: Choose whether to apply for certificates from Let's Encrypt or ZeroSSL.<br>

  <figure><img src="/files/45jgoaCDUk4nNELhPY4r" alt=""><figcaption></figcaption></figure>

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

### Advanced Settings

{% hint style="info" %}
The Advanced Settings functions must first be configured in Module Management and Advanced Firewall settings before you can apply them here. For detailed settings, please refer to the following links:<br>

* Timestamp Anti-leech, CORS, Custom Headers, URL Redirect, Origin Rewriting:
  * Refer to: <https://doc.user.cdnray.net/en/modules/cors-setting>
* Advanced Firewall, Advanced WAF:
  * Refer to:  <https://doc.user.cdnray.net/en/acl#advanced-waf-beta>
    {% endhint %}

<figure><img src="/files/JqREZz2vXvsT9EOWFKdN" 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/domain-management/add-domain.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.
