securitysslcertificatepkisan

How to access the website via IP address without SSL error


When I'm accessing any host via IP address, it is showing SSL error.

Example.com => 192.168.1.1 (IP address)

Suppose if I want to access https://example.com, it works fine. If on the other hand, accessing the hosts by its IP address like https://192.168.1.1, it shows SSL Error.

Is there any configuration missing here. Do I need to add the IP address in SAN configuration?


Solution

  • If you want to access a web site by IP address you need to first configure your web server to actually provide this web site on this IP address and then you have to include the IP address as SAN into the certificate served at this IP address. Note that there are different types of SAN: DNSName and IPAddress. The correct type would be IPAddress but some clients actually wrongly expect type DNSName - so you better add the IP address with both SAN types.