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.

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

2 Answers 2

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

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.