I am hosting a domain in aws and want to allow https requests to it. I have done the following steps.
- requested a certificate from ACM, validated the emails and it is issued.
- created a classic load balancer (LB) with http and https listeners that forward to the instance through http(80).
- attached the certificate to the LB and added the instance that runs the website.
- made sure the security groups attached to the instance and LB have http(80) and https(443) in the inbound rules.
- the only outbound rule is (All traffic - All - All - 0.0.0.0/0) for both LB and instance security groups.
I then waited for the instance to be "inService" and tested the LB by browsing to its DNS and it opened. also http ://mydomain.com opened but when I tried https ://mydomain.com I get a message that the browser can't reach the server.
After some search I added the following 2 records.
- A record with name "mydomain.com" and value "LB domain.com".
- CNAME record with name "www" and value "mydomain.com".
I tried again but got the same results as above. Finally I came to an answer that I should enable https in my instance server.
when I did this and browsed I got a "Secure Connection Failed" with Error code "SSL_ERROR_RX_RECORD_TOO_LONG".
it looks like the LB doesn't terminate the https requests to my domain.
Any idea what I have done wrong!
Update: I removed the A record I created but when I made a DNS lookup, I found an A record pointing to my elastic ip. and although I have a CNAME record, the DNS lookup showed that I have no CNAME records.