rough explanation of what would need to be set-up to support the site

The site is currently being hosted on AWS S3 and cloudfront, and as such, it would likely be easiest to migrate it to a Rethink-controlled AWS environment.   This site does not require any back-end, meaning the site can be hosted on basically any web hosting service that provides ssl certificates (https) and "mod_rewrite" style redirects, however.

Host Transfer Directions

As the domains are registered by Rethink and pointing to AOS name servers, the easiest way to transfer would be to configure AWS resources on Rethink's side, and then switch the DNS name servers for the existing domains once everything else is ready.  Rethink would need to configure S3, CloudFront, and Route53 in advance of the name server switch.

Sample Configuration

S3:

  • Bucket must be configured to host websites per https://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html
  • Index and error pages should both be index.html
  • The website build files do not contain any private information and all resources can be made public
  • The file model/weights.bin should be configured with the Content-Type 'text/plain' to ensure CloudFront automatically compresses it over the network (this reduces the network payload for the ML library from 11MB to 6MB, approximately)

CloudFront:

  • HTTP Distribution
  • Redirect HTTP to HTTPS
  • Compress objects automatically
  • Default object index.html
  • Americas / Europe edge locations
  • Origin domain should be the URL displayed in the Properties tab in S3, under "Static website hosting"
  • Once the distribution is created, under the Behaviours tab, create a rule each for error code 403 and 404, to redirect to path / and use status code 200
  • Once this is complete, the cloudfront.net URL for this distribution should contain a working version of the site

Route 53:


  • Create a hosted zone for website.ca
  • Create record, simple routing, Define simple record
  • leave subdomain ('record name') blank, 'value/route traffic to' should be CloudFront distribution, distribution should be the one created previously, record type A, default TTL
  • repeat from step 2 to create a second record, but change type to AAAA
  • repeat from step 2 to create records for www.website.ca, changing 'record name' to 'www' in step 3
  • repeat from step 1 to create hosted zone for websiteinfrench.ca

DNS Configuration, etc.

Example DNS configuration is provided for Route 53 above, for other name servers a CNAME record can point www to the host, and the domain apex would typically point to either the host or a redirect service as it can't be a CNAME