0

I've set up a static website on AWS S3, using a custom domain hosted at Namecheap, and Cloudfront serving over https. I am able to access my site at http://mydomain.tld, which redirects (using a DNS redirect rule on Namecheap) to https://www.mydomain.tld, or by browsing to the https://www site directly.

However, if I try to force https in the browser to the bare domain (https://mydomain.tld), the site fails to load with "ERR_CONNECTION_REFUSED" (via Chrome). I confirmed that both alternate domain names are on the Cloudfront distribution, the SSL certificate contains both domains, and the http->https redirect is working. What could be missing from the configuration?

Feanor
  • 101
  • 2
  • Not sure this will solve the problem, but generally with AWS solutions you're best off using Route53 as your DNS server as it can do Alias Records which are custom to AWS. You can keep your domain registration at NameCheap, but delegate DNS to a R53 hosted zone. – Tim Aug 29 '21 at 19:09
  • @Tim Interesting idea. I'll look into switching that. – Feanor Aug 30 '21 at 14:27

0 Answers0