Anthony Maina
Anthony Maina

Reputation: 33

AWS ELB causing net::ERR_CERT_COMMON_NAME_INVALID error

Currently getting the net::ERR_CERT_COMMON_NAME_INVALID when trying to access my application through the ALB.

This is my current setup:

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

Answers (1)

Marcin
Marcin

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

Related Questions