Super User is a question and answer site for computer enthusiasts and power users. 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

Is it possible to somehow fetch the hostname where a website/service resides? I've tried looking into headers, and some more info, but from what I've seen it doesn't seem possible!

As an example: test.mysite.com to be the host's name in /etc/hostname

If it turns to be possible, how can I hide it?

The linux distribution that I use is Debian 6.0.

share|improve this question
up vote 2 down vote accepted

You're question seems to be about whether other people can see your host's name if you are running a publicly visible Web server on it. No, they only see the name you have published in the Domain Name System for your public IP address.

share|improve this answer

You can change the hostname to whatever you want as long you alter other configuration files along with the change.

As far as I know, there is no direct way of fetching the hostname of the computer unless there is a DNS entry pointing to the IP address with that hostname. However, some servers might have an API method or a procedure call which makes them get and print/send the hostname.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .