0

Some web applications require multiple servers for multiple users (chat applications, multiplayer browser games, etc.) However, if data is loaded from a location other than the domain name, ERR_CERT_COMMON_NAME_INVALID error is given in Chrome and similar errors in other browsers because of SSL. For example:

img.src = "https://[IP Address]/logo.png"

would throw ERR_CERT_COMMON_NAME_INVALID, where [IP Address] is the ip address of the server. If it was loaded from the domain name instead it would work fine. The same problem also applies to websockets. So how can data be loaded from an ip addresses for a web application with multiple servers to work?

  • The easiest way would be to just give them domain names. – gre_gor Mar 12 '18 at 22:31
  • You should use a DNS Name, not a IP address. Also, ***`CN=www.example.com`*** is probably wrong. Hostnames always go in the *SAN*. If its present in the *CN*, then it must be present in the *SAN* too (you have to list it twice in this case). For more rules and reasons, see [How do you sign Certificate Signing Request with your Certification Authority](http://stackoverflow.com/a/21340898/608639) and [How to create a self-signed certificate with openssl?](http://stackoverflow.com/q/10175812/608639) – jww Mar 13 '18 at 04:51
  • sub-domains also help. Like: `server1.example.com` and `server2.example.com` – Sepehr GH Mar 13 '18 at 05:37

0 Answers0