I'm using an AWS pattern to host a flat website at example.com
. It goes like this:
S3 bucket configured like a website
CloudFront distribution pointing at the S3 bucket with an SSL certificate for the
example.com
Route53 hosted zone with the
A
record aliased to the CloudFront distribution.
This all works very well!
However:
When I have a client that needs to control their own DNS (i.e. can't use my Route53 DNS) then I have to figure out a way to configure their DNS (e.g. GoDaddy) to route traffic to my CloudFront domain.
This is a problem because GoDaddy does not allow aliasing an A
record to another domain. Some do but GoDaddy doesn't. So I have to use a trick:
Create a
CNAME
forwww.example.com
pointing to my CloudFront domain.Create a 'forward' to redirect 301 all requests to
www.example.com
.
This works a treat for HTTP requests. But HTTPS requests hang and eventually gives ERR_CONNECTION_TIMED_OUT
. If I do the same thing on Enom I get ERR_ADDRESS_UNREACHABLE
.
Please note that I do have a certificate and have HTTPS connections allowed on CloudFront so this is very puzzling to me.
A
record by design maps a name to an IP address (same forAAAA
for IPv6). So you can't make appear there another domain.