Score:0

AWS S3 static website: unable to access https://mydomain.tld but http://mydomain.tld redirects to https correctly

ar flag

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?

Tim avatar
gp flag
Tim
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.
ar flag
@Tim Interesting idea. I'll look into switching that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.