Amazon Route 53
Developer Guide (API Version 2013-04-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Creating Alias Resource Record Sets

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

  • An alternate domain name for a CloudFront distribution: Amazon 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 Load Balancing load balancer: Amazon 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: Amazon Route 53 responds to each request with one IP address for the Amazon S3 bucket.

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

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

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

CNAME RecordsAlias Records

Amazon Route 53 charges for CNAME queries.

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

You cannot 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 resource record set at the zone apex.

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

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

A CNAME record can point to any DNS record hosted anywhere.

An alias resource record set can only point to a CloudFront distribution, an Elastic Load Balancing load balancer, an Amazon S3 bucket that is configured as a static website, or another resource record set in the same Amazon Route 53 hosted zone in which you're creating the alias resource record set.

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

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

A CNAME record is followed by a recursive resolver.

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


Note

If an alias resource record set points to a CloudFront distribution, an Elastic Load Balancing load balancer, or an Amazon S3 bucket, you cannot set the time to live (TTL); Amazon Route 53 honors the CloudFront, Elastic Load Balancing, or Amazon S3 TTLs. For more information about the current TTL value for Elastic Load Balancing, see the introduction to Using Domain Names With Elastic Load Balancing in the Elastic Load Balancing Developer Guide.