I want to redirect internet traffic from my root (apex) domain (for instance, to another domain (for instance, How can I do this?


Use the following procedure to redirect your domain. In this example, we redirect to


  • A hosted zone for the domain that is hosted in Amazon Route 53.
  • You have permissions to add resource records to the hosted zone of
  • You have permissions to create an Amazon Simple Storage Service (Amazon S3) bucket.
  • You are able to create an S3 bucket with the exact name for
    Note: The sites must use HTTP, because the redirect can’t connect to Amazon S3 over HTTPS. For HTTPS redirection follow instructions in the CloudFront section below.
  1. In the Amazon S3 console, create an S3 bucket with the exact name as
    Note: S3 bucket names must be globally unique. If the bucket name you need is already in use, you can’t use Amazon S3 for redirection. Consider other workarounds such as configuring redirection on your backend server.
  2. Select the bucket you just created, and then choose Properties. Expand the Static Website Hosting drop-down menu, and then choose Redirect all requests to another host name.
  3. In the Redirect all requests to another host name field, enter, and then choose Save.
  4. In the Route 53 console, select the hosted zone named
  5. Create a resource record for with the following values:
    Record Type: Choose A – IPv4 address.
    Alias: Choose Yes.
    Alias Target: Select the blank value field, expand the drop-down menu, and then choose your S3 bucket under the heading S3 Website Endpoints.
    Routing Policy: Choose Simple.
    Evaluate Health Target: Choose No, and then choose Create.
    Note: The drop-down menu might take a few moments to populate your bucket name.

You should now be able to redirect to You can confirm this by browsing to or CURL to You should see “301 Moved Permanently” in your curl output, redirecting to

Bucket Properties

Bucket Permissions


  1. Open the CloudFront console.
  2. Choose Create Distribution.
  3. Under Web, choose Get Started.
  4. For Origin Domain Name, enter your S3 bucket’s website endpoint.
  5. For Viewer Protocol Policy, choose HTTP and HTTPS.
    Note: Choosing HTTPS Only blocks all HTTP requests.

If you’re not using a custom domain with CloudFront, then choose Create Distribution to complete the process. If you are using a custom domain, then follow these additional steps before you create the distribution:

  1. For Alternate Domain Names (CNAMEs), type your custom domain.
  2. For SSL Certificate, choose Custom SSL Certificate. Then, choose the custom SSL certificate to assign to the distribution.
    Note: For more information on installing a certificate, see How do I configure my CloudFront distribution to use an SSL/TLS certificate?
  3. Choose Create Distribution.

Note: After you choose Create Distribution, it can take about 20 minutes for your distribution to deploy.

Be sure to update the DNS for your domain to a CNAME record that points to the CloudFront distribution’s provided domain. You can find your distribution’s domain name in the CloudFront console.

If you’re using Amazon Route 53 as your DNS provider, see Configuring Amazon Route 53 to route traffic to a CloudFront web distribution. If you’re using another DNS provider, you can create a CNAME record ( CNAME to point to the distribution’s domain.

Important: DNS standards require that an apex domain ( use an authoritative (A) record that maps to an IP address. You can point your apex domain to your CloudFront distribution only if you’re using Route 53. If you’re using another DNS provider, you must use a subdomain (

S3 redirection root page: Add a redirect.html file within the web site hosting bucket with a small redirect page. Then point the CloudFront distribution to the new page instead of index. The final step is to have two aliases on my domain pointing to the CloudFront distribution.


<!DOCTYPE html>
  <meta http-equiv="refresh" content="0; url=">

CloudFront Origin:

Make sure you select a correct identity and choose to update bucket policy – this will create a correct bucket permissions. Enter all desired origins (ex. naked and www)

Route 53 setup: