I’ll just add this here and edit it in at the first post:
If you use HTTPS the name or IP has to be in the certificate, else it won’t work.
I’ll have a deeper look into this but I don’t know of a way by now.
If you use a self-signed certificate you need to import it on your iOS Device, easiest way is to mail it to yourself and open the attachment.
In addition since iOS 10.3 you have to active trust your certificate by going to Settings->General->About, scroll to the end to “certificate trust settings” check your certificate