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 CloudFront when you're using CloudFront alternate domain names (such as example.com) instead of the CloudFront domain name for your distribution (such as d111111abcdef8.cloudfront.net).

Note

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

  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. For each of the alternate domain names that you added to your distribution, either create domains or subdomains for the alternate domain names, or migrate existing domains or subdomains. Note the following:

    • 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 one hosted zone.

    • 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.

    For more information about creating and migrating domains and subdomains, see the applicable topic:

  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.

    If you're using the Amazon Route 53 console to create resource record sets, specify A - IPv4 address for Type. If you're using the Amazon Route 53 API, specify A for Type.

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