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've setup a dynamic DNS service with DynDNS, let's call it:

When I setup a Linux server, what should be my hostname and domain name??

For instance, if I setup Slackware Linux, the installation program asks for them, and if I enter "" for the hostname and domain name, the installation sets up my server as "", which obviously doesn't look right.

What is the correct way to do this when using dynamic DNS? If I use "foobar" as the hostname, and "" as the domain name, it doesn't seem right either, as I don't really "own" or exercise control over the domain "".

Thanks for your answers.

share|improve this question
up vote 2 down vote accepted

When I used DynDNS for their free dynamic service, I used as the domain and had the wildcard redirect enabled. That let everything work more or less transparently, since I could have local DNS and use vhosts to make sites appear at the same URLs on the inside and the outside.

crb is completely correct that you can use whatever you want as an internal domain, but this setup always worked well for me. I think wildcard requires paying now or something, though; in which case this is markedly less useful. ;)

share|improve this answer
P.S. and the hostname being whatever hostname you like; my naming scheme at the time was 17th century scientists and philosphers. So boyle, bacon, descartes, etc. – Michael Lowman Jul 15 '11 at 16:14

There need be no connection between any external DNS name and any hostnames/internal DNS.

What you call the hostname (sometimes the 'local part'), should be alphanumeric, no dots. There's a whole RFC on how to pick a name.

Your DNS suffix ('domain name') is added to hostnames when you try and resolve them. As you say, even if you have servers 'foo' and 'bar', it doesn't help you to type 'ping baz' and get a different customer. (It doesn't hurt either.)

It is possible to select your own internal domain - I personally tend to use something at '.tla' from habit, as it's not ever going to conflict with anything on the Internet. Don't use .local, as that has a specific meaning.

share|improve this answer
So do you mean I can have anything, say, "abc.def.ghi" for my hostname, and my existing "" for my domain name during server setup? If so, to connect to the server I would use "" regardless of what I setup the hostname to be? Or would it become ""? – hpy Jul 15 '11 at 15:32
Your hostname should be whatever you want to name your computer. Your DNS suffix should be whatever domain you're on, or make one up if you're not in a domain. I recommend you take a look at this – Daniel B. Jul 15 '11 at 15:44
What crb is saying is that your internal and external domain name are two different things. What dyndns does is receive requests for and forward them to your router's external IP. You then need to tell your router that requests on port 80(or whatever else you need) are forwarded to your server. Your hostname and dns suffix for your server are separate, dyndns won't even know what they are (nor should it). – Daniel B. Jul 15 '11 at 15:46
Clarified a little that the hostname should be a single alphanumeric, no .s – crb Jul 15 '11 at 15:49

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.