Hostname vs. IP - address

user4175869 picture user4175869 · Oct 24, 2014 · Viewed 26.6k times · Source

I am currently implementing openssl into my application. My problem arose when I had to set the hostname, IP - address, and port of the BIO. I have always known ip and hostname to be the same thing. Could someone please explain the difference.

Answer

Circadian picture Circadian · Oct 24, 2014

A host name is a combination of the name of your machine and a domain name (e.g. machinename.domain.com). The purpose of a host name is readability - it's much easier to remember than an IP address. All hostnames resolve to IP addresses, so in many instances they are talked about like they are interchangeable.