Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Usually, the syntax in the /etc/hosts file is

IP hostname alias1 alias2

but I want to make something like


but I don't want to specify the SERVER IP in the file, only the host name.

Is there any way to achieve it, with this file or any other? Thanks.

share|improve this question
up vote 2 down vote accepted

The only way I know of to easily achieve what you want is to simply insert the record if you have your own DNS server, or see if your router allows you to insert custom zones.

However, you will probably still have the same problem as (If I understand what you want to do) remote servers usually need to be configured for host headers if the server hosts more than one website.

share|improve this answer

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.