Amazon Route 53
Developer Guide (API Version 2013-04-01)
Did this page help you?  Yes | No |  Tell us about it...
« 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.

Routing Queries to an Amazon CloudFront Distribution (Public Hosted Zones Only)

If you're using CloudFront to distribute your content, you can use Amazon Route 53 to route queries to your CloudFront distribution. The name of your Amazon Route 53 hosted zone (such as example.com) must match an alternate domain name in the CloudFront distribution. You cannot route queries to the CloudFront domain name for your distribution (such as d111111abcdef8.cloudfront.net). The following procedure assumes that you have already registered the applicable domain names.

Note

You can route queries to a CloudFront distribution only for public hosted zones.

To route queries to an Amazon CloudFront distribution

  1. Create your CloudFront distribution, and add one or more alternate domain names (example.com, www.example.com) to the distribution. For more information, see the following topics in the Amazon CloudFront Developer Guide:

  2. If Amazon Route 53 is not the DNS service for one or more of the alternate domain names that you added to your distribution, migrate DNS service for those domains to Amazon Route 53. For more information, see the applicable topic:

    If you want to route queries both for an alternate domain name that is the root domain (example.com) and for one or more subdomains (www.example.com, product-name.example.com) to your CloudFront distribution, you only need to create a hosted zone for the root domain.

    If you want to route queries for more than one alternate domain name that is the root domain, for example, the domain name and various misspellings of your domain name (example.com, ex-ample.com), create one hosted zone for each root domain name. You must register each domain name that you want to use.

  3. Create one or more alias resource record sets that route queries to your CloudFront distribution:

    • If you want to route queries both for an alternate domain name that is a root domain (example.com) and for alternate domain names that are subdomains (www.example.com, product.example.com): Create the following alias resource record sets:

      • Create one alias resource record set for the root domain name.

      • Create one alias resource record set for each subdomain name.

      The name of each alias resource record set must match an alternate domain name in the distribution that you want Amazon Route 53 to route queries to.

    • If you want to route queries for more than one alternate domain name that is a root domain (example.com, ex-ample.com): In each hosted zone that you created in Step 2, create an alias resource record set that has the same name as the hosted zone.

    For more information about alias resource record sets in Amazon Route 53, see Choosing Between Alias and Non-Alias Resource Record Sets. For information about creating resource record sets, see Creating Resource Record Sets by Using the Amazon Route 53 Console.