Skip to content

Instantly share code, notes, and snippets.

@andimiya
Last active March 7, 2019 17:53
Show Gist options
  • Save andimiya/a9517913d988d9a0d28d9ddfce28c73e to your computer and use it in GitHub Desktop.
Save andimiya/a9517913d988d9a0d28d9ddfce28c73e to your computer and use it in GitHub Desktop.

Request SSL Certificates for both www and non-www domains

In S3

  1. Create S3 Bucket for non www URL (ie: Bucket Name crypto-track.com) with Static Site Hosting
  2. Place the front-end built files in this bucket
  3. Create an S3 Buckt for the www URL (ie: Bucket Name www.crypto-track.com)
  4. In Static Website Hosting - Check off Redirect request and enter in the URL of the Target bucket or domain (crypto-track.com)

In Route53

  1. Create a Record Set for the non-www domain
  • Set Alias to Yes
  • Alias Target: Select the non-www Cloudfront Distribution that's already set up
  1. Create a Record Set for the www domain
  • Set Alias to Yes
  • Alias Target: Select the www Cloudfront Distribution that's already set up

IMPORTANT:

  • Take the nameservers from the Route 53 record set and type them into the Registered Domains area

In Cloudfront

  1. Create a Cloudfront Distribution (Point the Origin Domain Name to the S3 Bucket: crypto-track.com.s3-website-us-east-1.amazonaws.com)
  • Default Root Object: index.html
  • Alternate Domain Names (CNAMEs): crypto-track.com
  1. Create a Cloudfront Distribution for the www (Point the Origin Domain Name to the www S3 Bucket: crypto-track.com.s3-website-us-east-1.amazonaws.com)
  • Default Root Object: index.html
  • Alternate Domain Names (CNAMEs): www.crypto-track.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment