Quick start

更新时间:
复制 MD 格式

When your website is connected to ESA by using the NS or CNAME method, you must add DNS records to ensure that your domain name resolves correctly and to accelerate access.ESA provides two methods to add DNS records: batch import and manual input. This topic describes how to quickly add DNS records.

Prerequisites

Before adding DNS records, ensure you meet the following requirements:

  • You have connected your website to ESA using the NS or CNAME method.

  • You have permission from your DNS provider to add or modify DNS records.

  • You understand the basic concepts and uses of common DNS record types, such as A, CNAME, MX, and TXT.

Usage notes

When you add or modify a DNS record, check the values for the hostname and the origin:

  • The hostname cannot match the hostname or origin of an existing DNS record, and it cannot be an origin in an origin pool.

  • The origin cannot match the hostname of an existing DNS record.

Method 1: Bulk import DNS records

To add multiple records, you can import them in bulk by using a template. This method is ideal if you are migrating existing DNS records from another DNS provider to ESA. If you need to add a single record, see Manually add a DNS record.

  1. In the ESA console, select Websites, and in the Website column, click the target site.

  2. Select DNS > Records and click Import.

  3. Select Import From Template and click Download Template. Edit the DNS record information in the template and save the file. Then, click Select File and choose the saved template.image

    DNS file import template

    ;hostname TTL IN record type record value
    
    $ORIGIN example.com.
    
    ; A record
    1.example.com.   600 IN  A   8.8.8.8
    
    ; AAAA record
    2.example.com.   600 IN  AAAA		2400:cb00:2049:1::a29f:f9
    
    ; CNAME record
    2.example.com.   600 IN  CNAME     example.com.
    
    ; MX record
    4.example.com.    600 IN  MX	15 mailhost.example.com.
    
    ; TXT record
    4.example.com.   600 IN  TXT	xxxxxxxxxxxxxxxxxxx
    
    ; NS record
    4.example.com.    600 IN  NS	ns.example.com.
    
    ; SRV record
    _sip._tcp.example.com.   600 IN  SRV	1 5 7001 srvhostname.example.com.
    
    ; CAA record
    hostname.example.com.    600 IN  CAA	0 issue example.com
    
    ; CERT record
    cert.example.com.	1	IN	CERT	0 0 0 VEVwQk5GWXlUR3RXVVZwc1RIcGFhMGh0UVhWUMQweHJFZENNM0JSVFROV2JVd3lWbFJOTkVSS1dnPT0=
    
    ; SMIMEA record
    smimea.example.com.	1	IN	SMIMEA	12 12 12 436c6f7564666c61726520444e53
    
    ; SSHFP record
    sshfp.example.com.	1	IN	SSHFP	12 12 436C6F7564666C61726520444E53
    
    ; TLSA record
    tlsa.example.com.	1	IN	TLSA	12 12 12 436c6f7564666c61726520444e53
    
    ; URI record
    uri.example.com.	1	IN	URI	12 12 "http://www.example.com/service"
  4. On the Import page, review and adjust the record configurations.

    By default, ESA provides only DNS resolution services. To enable ESA acceleration, turn on the proxy switch in the Proxy Status column.

    Note
    • For websites connected using the CNAME method, the proxy is enabled by default and the Proxy Status cannot be changed.

    • For websites connected using the NS method, proxying can only be enabled or disabled for A, AAAA, and CNAME records.

    image

    For information about different use cases, see Use case descriptions.

  5. After adjusting the DNS records, click OK.

  6. (Optional) For websites connected using the CNAME method, follow the on-screen instructions to configure the CNAME record with your DNS provider after adding the record.

Method 2: Manually add a DNS record

To add a single record, enter its details manually. This method is ideal for new setups or for adding only a few records.

Example scenario

Assume your origin domain is example.com, and you want to accelerate web pages for the subdomain www.example.com by using a CNAME record. This example shows how to add the DNS record for this scenario.

Procedure

  1. In the ESA console, go to Websites and click the target website in the Website column.

  2. Select DNS > Records and click Add Record.

  3. Enter the required parameters and click Next. For more information about record types and parameters, see Parameter descriptions for adding records.

    Parameter

    Description

    Example value

    Record Type

    Select the record type.

    CNAME

    Hostname

    The prefix of the subdomain. Supports lowercase letters, numbers, wildcards * (for wildcard domain records only), hyphens - (cannot be the first or last character), @ (for root domain records only), and underscores _ (supported at the start of TXT, CAA, CNAME, NS, and SRV records only when proxy acceleration is disabled). The maximum length is 63 characters.

    www

    Proxy Status

    Turn on the toggle switch to enable proxy acceleration.

    Enabled

    Record Value

    Select the type of record value.

    Domain Name

    Domain Name

    Enter the origin domain name.

    example.com

    Origin Host

    The default setting is Match Requested Domain Name, which is typically sufficient. If no origin rule is configured, ESA applies the following defaults: the origin host is determined by the HOST policy in the DNS record, the origin SNI matches the origin host value, and the origin protocol and port match the client's request.

    Match Requested Domain Name

    image

  4. Select the Web use case and click OK. For information about different use cases, see Use case descriptions.

  5. (Optional) For websites connected using the CNAME method, follow the on-screen instructions to configure the CNAME record with your DNS provider after adding the record.

Use cases

In the scenario configuration for DNS records, ESA provides 5 business scenarios. By selecting the scenario type that corresponds to your business scenario, you can dynamically assign a more suitable security acceleration policy to your domain name. You can edit records and adjust business types at any time in the console.

Use case

Description

Web

Suitable for accelerating websites with a mix of static content (small files) and dynamic content (API requests). Examples: personal blogs, small user-generated content (UGC) communities, and small independent e-commerce sites.

Large File Download

Ideal for large file distribution scenarios. Examples: software installation packages (apps, games, clients), patch updates, and firmware upgrades. Caching large files at the edge reduces origin load and improves download speeds.

Audio/Video On-Demand

Suitable for accelerating the distribution of on-demand audio and video content. Examples: short video playback and live stream replays.

API Acceleration

Designed for accelerating purely dynamic, API-based services that generally do not require caching. Examples: account password verification, order payment processing, log uploads, and real-time data synchronization.

AI Tokens

Optimized for AI model inference scenarios, accelerating high-frequency, small requests at the token level. Examples: streaming inference APIs for Large Language Models (LLMs), real-time token-level translation, and intelligent chatbot conversations. Edge acceleration reduces end-to-end latency for token requests.

Important
  • When using the Audio/Video On-Demand or Large File Download use cases, we recommend enabling resource abuse protection to prevent malicious resource consumption and avoid unnecessary costs.

  • When using the API Acceleration or AI Tokens use cases, the system automatically creates optimized configuration rule templates, which you can manually disable. These templates configure cache eligibility and enable smart routing. Note that smart routing is a separately billed feature.