I have a back-end server with a permanent public IP for it. From my finding it looks like I can't have a CA certificate for my public IP, I need to produce a domain name for it and then add an A record. E.g. https://server.my-domain.com
But what I want to know is, whether it is possible to have any certificate(self-signed or CA one) to have something like https://my-public-ip
and be not be marked as a potential threat by http clients or browsers?
Also If my understanding is correct, a CA cert is needed to prove that the Domain is authentic, and no one is impersonating it. Apart from this purpose self signed certificate should also be good enough just for the encryption purposes? If that is the case, why can't I simply have a self signed certificate (without being flagged) for my public IP, since I already know to which system I'm talking to?