How do I create alias records for services hosted in AWS?

4 minute read

I am creating custom DNS records for services hosted on AWS. What type of alias record should I use?

Short description

Amazon Route 53 alias records are mapped internally to the DNS name of alias targets such as AWS resources. Route 53 monitors the IP address associated with an alias target's DNS name for scaling actions and software updates. The authoritative response from Route 53 name servers contains an A record (for IPv4 addresses) or AAAA record (for IPv6 addresses) with the IP address of the alias target.


Create an alias record

Create your record using the Route 53 console and specify the necessary values for alias records.

Be sure to use the correct DNS record type for IP addresses in the service you're pointing to:

  • Amazon CloudFront distribution – A record (IPv4) or AAAA record (IPv6)
  • AWS Elastic Beanstalk environment – A record (IPv4)
  • Elastic Load Balancing (ELB) load balancer – A record (IPv4) or AAAA record (IPv6)
  • Amazon Simple Storage Service (Amazon S3) bucket – A record (IPv4)
  • Amazon API Gateway custom regional API and edge-optimized API – A record (IPv4)
  • Amazon VPC interface endpoint – A record (IPv4)
  • AWS Global Accelerator – A record (IPv4)
  • Another Route 53 record in the same hosted zone

Note: Some services require you to set up a custom DNS name before creating the record. These services include Amazon API Gateway and Amazon Cloudfront.

CNAME support

Route 53 follows the pointer in an alias record only if the record type matches. To create an alias record for a CNAME record, the alias target must resolve to a CNAME value.

Even if you create an invalid CNAME(ALIAS) record, Route 53 can't resolve the IP address of the endpoint. As a result, Route 53 returns an SERVFAIL/REFUSED RCODE error.

Valid CNAME(ALIAS) record:


Invalid CNAME(ALIAS) record:

NameTypeValue                                               CNAME(ALIAS)                     

Pointing from non-Route 53 DNS providers

If you use a DNS provider other than Route 53 for your domain name, then you might be able to point the domain to services hosted on AWS. Check if your DNS provider supports CNAME records on a root domain using techniques such as CNAME flattening, ANAME records, or WebHops redirection.

Considerations for creating CNAME records

1.    You can't create a CNAME record for the Parent, Naked, or Apex domain. With Route 53, you can use an alias record to point the parent domain to other supported alias targets.

For example, if you created a hosted zone for the domain "", then you can't create the following CNAME record. CNAME

If you created a hosted zone for the domain "", then you can't create the following CNAME record: CNAME

With Route 53, you can create an alias record instead. For example: Alias(A)

2.    CNAME records can't coexist with other record types for the same domain in the hosted zone file. For example, you can have only one record type for the domain "" if the record type is CNAME. You can't create the following record: CNAME A

3.    You can create a wildcard record that can coexist with the CNAME record. For example: CNAME
*   A

Related information

Why can't I select my preferred alias target when creating a Route 53 alias resource record set?

AWS OFFICIALUpdated 2 years ago