Reputation: 33
Currently getting the net::ERR_CERT_COMMON_NAME_INVALID
when trying to access my application through the ALB.
This is my current setup:
example.com
& *.example.com
using AWS Certificate Manager.example.com
attached to them.HTTPS: 443
listener forwarding https
traffic to ec2 instances on port 80.https://xxxxxxxxxx.elb.amazonaws.com/api
Accessing the application via https://example.com
causes net::ERR_CERT_COMMON_NAME_INVALID
in the console with the browser saying:
Error: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxxxxxxxx.elb.amazonaws.com” which could put your confidential information at risk.
I'd be happy to provide more details if it helps.
Upvotes: 3
Views: 1056
Reputation: 239000
If you have your own domain example.com
with correct SSL certificate then you can't use https://xxxxxxxxxx.elb.amazonaws.com/api
which is AWS domain. The reason is that SSL cert is for example.com
, not for https://xxxxxxxxxx.elb.amazonaws.com/api
.
You have to modify your application code to only use example.com
.
Upvotes: 1