Menu
Amazon Route 53
Developer Guide (API Version 2013-04-01)

Choosing Between Alias and Non-Alias Records

While ordinary Amazon Route 53 records are standard DNS records, alias records provide a Route 53–specific extension to DNS functionality. Instead of an IP address or a domain name, an alias record contains a pointer to a CloudFront distribution, an Elastic Beanstalk environment, an ELB Classic, Application, or Network Load Balancer, an Amazon S3 bucket that is configured as a static website, or another Route 53 record in the same hosted zone. When Route 53 receives a DNS query that matches the name and type in an alias record, Route 53 follows the pointer and responds with the applicable value:

  • An alternate domain name for a CloudFront distribution – Route 53 responds as if the query had asked for the CloudFront distribution by using the CloudFront domain name, such as d111111abcdef8.cloudfront.net.

  • An Elastic Beanstalk environment – Route 53 responds to each request with one or more IP addresses for the environment.

  • An ELB load balancer – Route 53 responds to each request with one or more IP addresses for the load balancer.

  • An Amazon S3 bucket that is configured as a static website – Route 53 responds to each request with one IP address for the Amazon S3 bucket.

  • Another Route 53 record in the same hosted zone – Route 53 responds as if the query had asked for the record that is referenced by the pointer.

If an alias record points to a CloudFront distribution, an Elastic Beanstalk environment, an ELB load balancer, or an Amazon S3 bucket, you cannot set the time to live (TTL); Route 53 uses the CloudFront, Elastic Beanstalk, Elastic Load Balancing, or Amazon S3 TTLs. If an alias record points to another record in the same hosted zone, Route 53 uses the TTL of the record that the alias record points to. For more information about the current TTL value for Elastic Load Balancing, go to Request Routing in the Elastic Load Balancing User Guide and search for "ttl".

Alias records can save you time because Route 53 automatically recognizes changes in the records that the alias record refers to. For example, suppose an alias record for example.com points to an ELB load balancer at lb1-1234.us-east-2.elb.amazonaws.com. If the IP address of the load balancer changes, Route 53 will automatically reflect those changes in DNS answers for example.com without any changes to the hosted zone that contains records for example.com.

For information about creating records by using the Route 53 console, see Creating Records by Using the Amazon Route 53 Console. For information about the values that you specify for alias records, see the applicable topic in Values That You Specify When You Create or Edit Amazon Route 53 Records:

Alias records are similar to CNAME records, but there are some important differences:

CNAME Records Alias Records

Route 53 charges for CNAME queries.

Route 53 doesn't charge for alias queries to CloudFront distributions, Elastic Beanstalk environments, ELB load balancers, or Amazon S3 buckets. For more information, see Amazon Route 53 Pricing.

You can't create a CNAME record at the top node of a DNS namespace, also known as the zone apex. For example, if you register the DNS name example.com, the zone apex is example.com.

You can create an alias record at the zone apex.

Note

If you create an alias record that routes traffic to another record in the same hosted zone, and if the record that you're routing traffic to has a type of CNAME, you can't create an alias record at the zone apex. This is because the alias record must have the same type as the record you're routing traffic to, and creating a CNAME record for the zone apex isn't supported even for an alias record.

A CNAME record redirects queries for a domain name regardless of record type.

Route 53 follows the pointer in an alias record only when the record type also matches.

A CNAME record can point to any DNS record hosted anywhere, including to the record that Route 53 automatically creates when you create a policy record. For more information, see Using Traffic Flow to Route DNS Traffic.

An alias record can only point to a CloudFront distribution, an Elastic Beanstalk environment, an ELB load balancer, an Amazon S3 bucket that is configured as a static website, or another record in the same Route 53 hosted zone in which you're creating the alias record. However, you can't create an alias that points to the record that Route 53 creates when you create a policy record.

A CNAME record is visible in the answer section of a reply from a Route 53 DNS server.

An alias record is only visible in the Route 53 console or the Route 53 API.

A CNAME record is followed by a recursive resolver.

An alias record is only followed inside Route 53. This means that both the alias record and its target must exist in Route 53.