You can create a CNAME record to map a specified domain name to a CNAME that can resolve to an IP address. Application Load Balancer (ALB) allows you to create CNAME records to map your frequently used domain names to a CNAME that ALB uses to provide services. This facilitates access to network resources.
DNS record types supported by ALB
A records and CNAME records are common DNS records. ALB provides domain names to allow external access and supports only CNAME records.
- A recordsAn A record maps a domain name or a subdomain name to an IP address. You can create an A record to point a specified subdomain name to the IP address of your destination server. By default, Application Load Balancer (ALB) provides public IP addresses to allow external access. To use a domain name to access a server, you can create an A record. The following figure shows the workflow.
- CNAME recordsA CNAME record maps a domain name or a subdomain name to a CNAME. You can create a CNAME record to point a specified subdomain name to a CNAME. By default, Application Load Balancer (ALB) provides domain names to allow external access. To use a custom domain name to access ALB, you must create a CNAME record and map the custom domain name to a CNAME. The following figure shows the workflow.
Prerequisites
An ALB instance is created. For more information, see Create an ALB instance.
Configure a CNAME record
- Log on to the ALB console.
- In the top navigation bar, select the region where the ALB instance is deployed.
- Find the ALB instance that you want to manage and copy the domain name.
- To create a CNAME record, perform the following operations:
What to do next
To verify the CNAME record, ping
or dig
your custom domain name in the command line. If the domain name of the ALB instance is displayed, the CNAME record works as expected.