Connection basics
A connection relies on an address, a reachable port and matching protocol settings. TCP and UDP are different transports and should be tested separately.
Certificates
Use the correct hostname and keep certificate verification enabled. A certificate error should be investigated before sending private information.