Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

IP hostname alias1 alias2

but I want to make something like

SERVER  SERVER2

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

1 Answer 1

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

 
discard

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.