Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a SSl secured link and I need an IP to be mapped against it, I tried with general mapping in hosts file by using below snippet:

<IP Address>

in above snippet is SSl certified and hence opens up with https protocol,

but after above configuration, when I hit to the mapped IP i do not get navigated to SSL certified page, rather I am navigated to Non SSL page of same domain.

Any help regarding this will be appreciated.


share|improve this question
You might want to do a redirect in your web server, as far as I know, there's no way to specify protocols or ports in host files. – NickW Feb 7 '13 at 10:22
up vote 2 down vote accepted

Host files only do address translation. Meaning they translate a certain name like to an ip address. It is not aware of any protocols. Hence what you are trying to achieve is not possible with hostfiles.

You will need to configure a redirect or rewrite on your webserver rather than on your client.

share|improve this answer
Thanks for the details @Lucas – OM The Eternity Feb 7 '13 at 12:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.