Self signed certificate honoring both, Machine Name & IP Address

11,476

You should create a certificate with multiple Subject Alternative Names. What you put in the CN at that stage doesn't really matter (it's only a fallback solution when there are no SANs), but putting the host name should help you identify the certificate in various lists.

Note that the entries for host names should be of dNSName type, but the entries for the IP address should be of iPAddress type, so you need a certificate creation tool that supports both. There are more details in this question (not specific to Java).

Note that IP addresses can be OK in a development context, but host names are often better anyway. Few (if any) CAs will issue you with a certificate tied to an IP address.

Share:
11,476
Kabeer
Author by

Kabeer

Updated on June 07, 2022

Comments

  • Kabeer
    Kabeer almost 2 years

    I generated a self signed certificate on IIS 7.5. It got generated against the machine name. At present I am testing my website over the IP address. On accessing it on Chrome over https I get a message, "You attempted to reach IP Address, but instead you actually reached a server identifying itself as Machine Name".

    How can I ensure that the certificate can honor both the Machine Name and the IP address?

    If in case both cannot be honored, how can I make it honor the IP address only?