Following a domain name upgrade for Server Load Balancer (SLB) instances, you can no longer directly access newly created Application Load Balancer (ALB) instances by using their DNS names. To access your ALB instance, you must add a CNAME record with your DNS provider to map a custom domain name to the DNS name of the ALB instance.
Configure and verify the CNAME record
Go to the ALB console, find the target instance, and copy its DNS name from the Domain Name column.
Add a DNS record with your DNS hosting provider. This example uses Alibaba Cloud DNS.
You can add domain names not registered with Alibaba Cloud to the Alibaba Cloud DNS console to manage them with Alibaba Cloud DNS.
Go to the Public Zone page in the Alibaba Cloud DNS console. Click the target domain name to open the Settings page, then click Add Record.
Configure the CNAME record with the following settings, then click OK.
Record Type: Select CNAME.
Hostname: Enter the prefix of your custom domain name. For example, if your custom domain name is
www.example.com, enterwww.Query Source: Keep the default value, Default. This setting applies the record to all DNS requests.
TTL: The Time-to-Live (TTL) specifies how long DNS resolvers cache the record. A lower TTL value helps changes take effect more quickly.
Record Value: Paste the DNS name of the ALB instance that you copied earlier.
To resolve a DNS record conflict when adding the record, delete the conflicting record or use a different hostname.
Verify that the custom domain name points to the ALB instance.
Open a command-line terminal on your local computer and run
ping <custom_domain_name>ordig <custom_domain_name>.If the output includes the DNS name of the ALB instance (for example,
alb-xxxx.<region-id>.alb.aliyuncsslb.com), the CNAME record is active.Note: New CNAME records take effect almost immediately. However, changes to existing records can take longer to propagate, as DNS servers follow the cached record until its TTL expires.
References
To learn how to forward requests from different domain names to different backend servers using the same ALB instance, see these documents: