Search code examples
httpsdnslocalhost

Windows hostfile using https?


I'm trying to do a few mappings of my local network. so far with great success, but now im trying to access a part that is using http, and have so far not been having any success for that

Ive tried https://192.168.1.11 unifi

Is there a way to add https:// and ports like https:192.168.1.11:8443 unifi


Solution

  • The host file exists only to map hostnames to IP addresses. It knows nothing of HTTP and ports which would be handled by the server running at the IP address you are pointing to.

    To map the hostname unifi to 192.168.1.11 your entry would look something like:

    192.168.1.11 unifi www.unifi

    And you would access port 8443 via HTTPS by going to https://unifi:8443 assuming the server at that location is set up to handle the request.

    https://en.wikipedia.org/wiki/Hosts_(file)