You need to enable JavaScript to run this app.
Load Balancer

Load Balancer

Copy page
Download PDF
Instance
Adding a CNAME record pointing to an instance domain name
Copy page
Download PDF
Adding a CNAME record pointing to an instance domain name

This article describes how to add a CNAME record to point your custom domain name to the domain name of an ALB instance.

Background information

Instance domain name

After you create an ALB instance, the system assigns not only an IP address but also a unique domain name to the instance. The format of the instance domain name is: instanceId.regionId.volcenginealb.com. For example: alb-abc123def456.cn-beijing.volcenginealb.com.
You can use a custom domain name that is easier to member such as www.example.com and associate it with the instance domain name. When a client initiates a request using the custom domain name, the DNS server resolves the custom domain name to the instance domain name.
The association between the custom domain name and the instance domain name is implemented through a CNAME record. For instructions on how to add a CNAME record, refer to the following sections.

warning

The domain name of an ALB instance is intended only for use as the target in a CNAME record and cannot be accessed directly. To ensure your service is accessible, always use a custom domain name.

CNAME record

A CNAME record is a type of DNS record used to create an alias for a domain name. A CNAME record allows one domain name to point to another domain name, rather than to an IP address. When a client initiates a request using a domain name configured with a CNAME record, the DNS server resolves that domain name to the target domain name in the CNAME record.

Procedure

  1. Obtain the instance domain name.
    1. Log in to the ALB console.
    2. In the left-side navigation pane, click Instance to enter the Instance page.
    3. On the Instance page, find the ALB instance you want to view, and copy the domain name in the Instance domain column.
  2. Register a domain name.
    If you don't have a domain name yet, you need to register one with a domain registrar. You can use Volcano Engine's domain service to register a domain.
  3. Add a CNAME record.
    You need to add a CNAME record with your DNS service provider. Since different DNS service providers have different DNS record management pages, please refer to the relevant DNS service provider's product documentation or consult their customer service to understand the specific operation for adding DNS records. If your DNS service provider is Volcano Engine, refer to the Add a resolution record document to add a CNAME record.
    The following table lists the commonly used fields in a CNAME record. Field names may vary depending on the DNS service provider.

    Field

    Description

    Record type

    The record type needs to be set to CNAME.

    Domain/Host record

    Set this field according to your custom domain name and input rules. Typically, the domain prefix needs to be set.

    Record value

    The record value needs to be set to the domain name of the ALB instance you copied.

    TTL

    TTL refers to the expiration time of the DNS record cache.
    The smaller the TTL, the faster the DNS record update takes effect.

Subsequent operations

After adding a CNAME record, you can refer to the following content to verify whether the CNAME record has taken effect.

Verify whether the CNAME record has taken effect

Typically, newly added CNAME records take effect within a few minutes, while updated CNAME records may take longer to take effect due to factors such as TTL settings and DNS caching.
You can verify whether a CNAME record has taken effect using the following methods.

Method 1: Using the nslookup command

Run the following command:

nslookup -type=CNAME your_custom_domain

Replace your_custom_domain with your actual custom domain name.
If the returned result displays the domain name of the corresponding ALB instance, it indicates that the CNAME record has taken effect.

Method 2: Using the dig command

Run the following command:

dig -t CNAME your_custom_domain

Replace your_custom_domain with your actual custom domain name.
If the domain name of the corresponding ALB instance appears in the ANSWER SECTION of the returned result, it indicates that the CNAME record has taken effect.

FAQs

Conflict between CNAME records and A records

A domain name cannot have both CNAME records and A records. When you add a CNAME record for a domain name, if the system prompts that there is a record conflict, check whether an A record has already been configured for that domain name. If an A record exists, delete the A record first, and then configure the CNAME record.

Last updated: 2025.08.08 15:28:54