Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to the world of setting up servers and am baffled by the term hostname and fully qualified domain name. For example, if I want to set up a server that hosts files on the local network i.e. a file server, what would I use a hostname such as myfileserver or something else? What if I wanted to set up a web server, mail server, etc that external users could access?

share|improve this question

migrated from stackoverflow.com May 15 '11 at 6:56

This question came from our site for professional and enthusiast programmers.

Have a look at this question and it's answers serverfault.com/questions/222095/… –  Iain May 15 '11 at 13:57

3 Answers 3

up vote 10 down vote accepted

Your hostname is the name of your computer.

Your fully qualified domain name is your hostname plus the domain your company uses often ending in .local.

So if the name of your computer is bob, and your company's domain is contoso.local, your computer's fully qualified domain name is bob.contoso.local

Hostname: bob
Domain: contoso.local
FQDN: bob.contoso.local

In the case of a domain like contoso.local I did not use an "external" internet domain name. This name doesn't have to be the only way that you address the server. If you make it available by its IP address you can use DNS or that IP address to allow external users to access it.

Some more information on DNS:

share|improve this answer
So the name of my computer would have to be unique on the network segment I am on? I am further confused by the use of local. When would you use local? Would I only use say .com, .net, etc only if the server could be accessed externally? –  PeanutsMonkey May 15 '11 at 3:08
So if I set it up as say contoso.com and it points to an IP address that is internal e.g., what would that do as opposed to me naming it contoso.local? –  PeanutsMonkey May 15 '11 at 3:18
@sparks. I am also confused by the use of Domain your example i.e. contoso.local? What does the domain refer to when in an internal environment? I take it the term Domain refers to say contoso.com in an external environment and the FQDN would be bob.contoso.com? –  PeanutsMonkey May 15 '11 at 3:20
As an aside, don't use ".local" as your internal domain name. It's a reserved name for bonjour networking (An apple protocol that's used in more places than you think so saying "I don't have macs so I'm ok" isn't going to help) and as such, Microsoft no longer recommend it. –  RobM May 15 '11 at 9:33
One minor point - technically a domain is not considered fully qualified without a trailing . on the end, and the implicitly empty label. Therefore www.google.com. is an FQDN while www.google.com isn't. In practice, most applications (web browsers, mail clients, etc) assume any domain name containing at least one dot is intended to be fully qualified. –  Murali Suriar May 15 '11 at 15:32

The hostname is just the computer name and the fully qualified domain name is the hostname plus the domain name after it....

hostname: bigbox fqdn: bigbox.mynetwork.com

or commonly the fqdn ends in .local instead of .com but that is environment specific.

Usually you'd have a private DNS that has your .local domain setup in it and a separate DNS server for the public where your .com lives. You don't want to put your .local domain on a public DNS server because someone will have a way to get a list of all your hosts and it exposes your network to attack.

share|improve this answer

Think of it as 3 parts

Lets say, a university called FIU. (yes it is a real university) in the computer science side, we have a domain cs.fiu.edu

we also have other servers called moodle, which is the hostname of the server.

hostname = moodle
domain name = cs.fiu.edu
FQDN for that server is called moodle.cs.fiu.edu

now, cs.fiu.edu is a branch from the domain, fiu.edu. so hostname = cs domain = fiu.edu FQDN = cs.fiu.edu (which is a seperate server that hosts that) but the domain cs.fiu.edu belongs to our department. Not sure if it makes sense. But there can also be that scenario.

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.