What is a hostname versus a computer name versus a subdomain versus www?












10















I was searching for understanding what is the “www” at the beginning of so many web addresses in the Internet. I read in somewhere that “www” is called “hostname”.



The world “hostname” made me go a step further in searching, I read so many threads and articles but I am still confused about that.



So I decided to ask some related questions here to make it clear and I need solid and comprehensive answers please.




  1. “hostname” vs. computer name: Is the “hostname” the same as the computer name, if its true, suppose that my computer is a web server and my computer name is “Robin” so is it correct to conclude that a hypothetical web site would be something like: Robin.websitename.com?


  2. “hostname” vs. subdomain: If “mail” in mail.google.com and “developers” in developers.google.com are called subdomains why is en in en.wikipedia.org called hostname? What is the difference between host name and subdomain?


  3. What is the relation between host name and fully qualified domain name (FQDN)?


  4. What is the “www” in URL of some web sites? As you know Google’s web address is www.google.com but we have many web sites without “www” for example: superuser.com and en.wikipedia.org. I read in this article that “www” is just a declarative thing not more and is not related to the concept of hostname. Do you verify that?











share|improve this question





























    10















    I was searching for understanding what is the “www” at the beginning of so many web addresses in the Internet. I read in somewhere that “www” is called “hostname”.



    The world “hostname” made me go a step further in searching, I read so many threads and articles but I am still confused about that.



    So I decided to ask some related questions here to make it clear and I need solid and comprehensive answers please.




    1. “hostname” vs. computer name: Is the “hostname” the same as the computer name, if its true, suppose that my computer is a web server and my computer name is “Robin” so is it correct to conclude that a hypothetical web site would be something like: Robin.websitename.com?


    2. “hostname” vs. subdomain: If “mail” in mail.google.com and “developers” in developers.google.com are called subdomains why is en in en.wikipedia.org called hostname? What is the difference between host name and subdomain?


    3. What is the relation between host name and fully qualified domain name (FQDN)?


    4. What is the “www” in URL of some web sites? As you know Google’s web address is www.google.com but we have many web sites without “www” for example: superuser.com and en.wikipedia.org. I read in this article that “www” is just a declarative thing not more and is not related to the concept of hostname. Do you verify that?











    share|improve this question



























      10












      10








      10


      12






      I was searching for understanding what is the “www” at the beginning of so many web addresses in the Internet. I read in somewhere that “www” is called “hostname”.



      The world “hostname” made me go a step further in searching, I read so many threads and articles but I am still confused about that.



      So I decided to ask some related questions here to make it clear and I need solid and comprehensive answers please.




      1. “hostname” vs. computer name: Is the “hostname” the same as the computer name, if its true, suppose that my computer is a web server and my computer name is “Robin” so is it correct to conclude that a hypothetical web site would be something like: Robin.websitename.com?


      2. “hostname” vs. subdomain: If “mail” in mail.google.com and “developers” in developers.google.com are called subdomains why is en in en.wikipedia.org called hostname? What is the difference between host name and subdomain?


      3. What is the relation between host name and fully qualified domain name (FQDN)?


      4. What is the “www” in URL of some web sites? As you know Google’s web address is www.google.com but we have many web sites without “www” for example: superuser.com and en.wikipedia.org. I read in this article that “www” is just a declarative thing not more and is not related to the concept of hostname. Do you verify that?











      share|improve this question
















      I was searching for understanding what is the “www” at the beginning of so many web addresses in the Internet. I read in somewhere that “www” is called “hostname”.



      The world “hostname” made me go a step further in searching, I read so many threads and articles but I am still confused about that.



      So I decided to ask some related questions here to make it clear and I need solid and comprehensive answers please.




      1. “hostname” vs. computer name: Is the “hostname” the same as the computer name, if its true, suppose that my computer is a web server and my computer name is “Robin” so is it correct to conclude that a hypothetical web site would be something like: Robin.websitename.com?


      2. “hostname” vs. subdomain: If “mail” in mail.google.com and “developers” in developers.google.com are called subdomains why is en in en.wikipedia.org called hostname? What is the difference between host name and subdomain?


      3. What is the relation between host name and fully qualified domain name (FQDN)?


      4. What is the “www” in URL of some web sites? As you know Google’s web address is www.google.com but we have many web sites without “www” for example: superuser.com and en.wikipedia.org. I read in this article that “www” is just a declarative thing not more and is not related to the concept of hostname. Do you verify that?








      networking hostname subdomain www






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 6 '15 at 15:05







      siamak

















      asked Mar 9 '15 at 1:30









      siamaksiamak

      161117




      161117






















          2 Answers
          2






          active

          oldest

          votes


















          20














          The best way to explain the differences between these different items—that are related but different—is to break it down by example. Think of networks like a tree:




          • There is a trunk that separates into major branches.

          • Branches which in turn separate into smaller branches.

          • Smaller branches eventually leading to individual leaves.


          The “trunk” and “branches” are “domains” and “subdomains” and the leaves are individual devices, like computers. So let’s start there.




          • A “computer name” is strictly a local convention: I have a computer named jakegould. This computer name is simply the name I have assigned my local machine. Nobody outside of my LAN will know this computer name; this is strictly a local setting.



          • A “hostname” (aka “nodename”) is a network identifier: If I wanted to publicly advertise my local computer to others, I would have to attach a “hostname” to the IP address of my computer. The “hostname” doesn’t really have to have anything to do with the computer name, but many times administrators like to use the same name to make things easier to understand. Also a “hostname” doesn’t always mean the computer is exposed to the Internet; it’s just an easy way to let others on your network where/what your computer is. As Wikipedia explains; emphasis is mine:




            In computer networking, a hostname (archaically nodename) is a
            label that is assigned to a device connected to a computer network
            and
            that is used to identify the device in various forms of electronic
            communication such as the World Wide Web, e-mail or Usenet.





          • A fully qualified domain name (FQDN) is just that; a fully qualified domain name: Now that might seem confusing but you need to think of it this way: It just means in the great scheme of things, what is the actual “path” to get to a computer. So let’s say I have my computer named jakegould and it has a hostname on my LAN that is jakegould. Within the context of my LAN, that jakegould is my computer name, and is my “hostname” and can possibly be considered my “fully qualified domain name” depending on my LAN architecture. Meaning let’s say my office LAN has other nodes in it like, first_floor and second_floor and my “hostname” of jakegould is on the second_floor network. Well, if that were the case, then my LAN-based “fully qualified domain name” would be jakegould.second_floor and that is it. But let’s say I worked at a big company named “big_company.com” and my computer were somehow exposed to the world. Then in that case, my WAN-based “fully qualified domain name” could be jakegould.second_floor.big_company.com or maybe even just jakegould.big_company.com if the network administrator didn’t want to be hassled with the “second_floor” designation. Again, as Wikipedia explains; emphasis is mine:




            A fully qualified domain name (FQDN), sometimes also referred to as an
            absolute domain name, is a domain name that specifies its exact
            location in the tree hierarchy of the Domain Name System (DNS). It
            specifies all domain levels, including the top-level domain and the
            root zone. A fully qualified domain name is distinguished by its lack
            of ambiguity: it can be interpreted only in one way.




          • The “www” in some website names is a “hostname” designation that is historical in nature: Basically, back in the 1990s when the world wide web was still in it’s infancy, networks had many different services attached to them. And mainly in an academic context. So there would be a place like whattsamattau.edu and that school would have FTP services on ftp.whattsamattau.edu, email on mail.whattsamattau.edu and so on… So when the world wide web came along, they would just have placed the web server on www.whattsamattau.edu. Nowadays, everyone—and seemingly everything in the world—has a website. And many people just register domains just for the web service. So the historic convention of www is discarded in many cases. Many people have websites without www but will still have accommodations to redirect www traffic to the main, non-www hostname. But technically speaking, www can still be considered a hostname.



          • BONUS (Never Asked But Mentioned/Implied): What is a “subdomain” in the great scheme of things: A subdomain is basically just a child of a parent domain/hostname. So in my example of jakegould.big_company.com the jakegould can be considered a subdomain of big_company.com and big_company in that can be considered to be the “domain” with .com being the top-level domain (TLD). Yet again, as Wikipedia explains; emphasis is mine:




            In the Domain Name System (DNS) hierarchy, a subdomain is a domain
            that is part of a larger domain.





          Now after drafting all of this, it can be confusing. Many computer names are hostnames are fully-qualified domain names and in some cases they could be subdomains. It’s all a matter of context. And looking at articles online the words “domain,” “host” and “node” are used fairly loose and fast all over the place. So in my opinion, many uses of these terms are synonymous.



          Which also helps to explain your confusion in item number 2:




          If “mail” in mail.google.com and “developers” in
          developers.google.com are called subdomains why is en in
          en.wikipedia.org called hostname? What is the difference
          between host name and subdomain?




          The en.wikipedia.org is a subdomain and a hostname. The en in the en.wikipedia.org is a subdomain of the domain name wikipedia.org. And en.wikipedia.org is in itself a hostname since en.wikipedia.org has an IP address connected to it and thus a computer connected to that IP address as well. Meaning the en itself is semantically considered a subdomain, but it is also a hostname because there is a host (computer) connected to the IP address connected to en.wikipedia.org. So knowing that mail.google.com and developers.google.com are hostnames as well which are both subdomains of google.com.



          To possibly make things clearer think of it like this; let’s use the non-existant subdomain fakename.wikipedia.org as an example:




          • The org in fakename.wikipedia.org is a top-level domain (TLD). As a top-level domain it does not resolve to an IP address. Thus it is not a hostname. It is simply a naming convention.

          • The wikipedia.org in fakename.wikipedia.org is a domain name and it has the potential to be a hostname as well if it is connected to an IP address and resolves to a computer when one goes to wikipedia.org.

          • The fakename in fakename.wikipedia.org is a subdomain name since it is a child domain of wikipedia.org in the context of the domain name itself. It can be a hostname if it connected to an IP address and resolves to a computer when one goes to fakename.wikipedia.org.


          If you ping fakename.wikipedia.org you are attempting to ping the fakename subdomain of wikipedia.org. If that ping dies—which it most likely will since it is fake—that means that the host is down or it does not exist. If it dies with an IP address connected to it, that would mean the hostname fakename.wikipedia.org is down. If the ping dies with 100% no IP address connected to it, them it would mean that the subdomain fakename.wikipedia.org is an invalid hostname.



          Yes, this can all be confusing. But what it boils down to is the difference between what a domain/subdomain is in the context of DNS entries versus what domain/subdomain is in the context of having a host/computer connected to it.



          So if this all started with your curiosity about www, that is a historic hostname/nodename/subdomain that is not really used as a convention as much anymore but is still so commonly used that many sites have some accommodations in place to “catch” requests to www and redirect them to the main hostname of a website.






          share|improve this answer

































            2















            1. Hostname is an attribute of a system stored locally on that system. "Computer name" is what Windows uses to refer to the hostname.



            2. A subdomain is a DNS concept. In DNS, domain names (domains for short) can be authoritative or non-authoritative - if they are non-authoritative, that means another server "handles" that domain. So in a domain such as www.mysite.invalid - one thing that could happen is that the root domain refers a lookup to a server handling the invalid domain, which then further refers the lookup to a server handling the mysite domain, etc.



              Your system might keep track of the domain it thinks it's on as well as a locally managed hostname.




            3. You can change your computer's local hostname, but this won't automatically update any DNS server pointed to your machine unless you have software specifically doing that (such as Active Directory in a corporate Windows environment).



              Many DHCP clients are also capable of changing a computer's local hostname in response to a DHCP response from a DHCP server.



              Typically a system's internal hostname and external DNS name will match, but they don't have to, though 99% of time you want them to.



              You can set your computer's hostname to the same as its full external DNS, and it usually makes sense to do so.




            4. Let's say you run a network somewhere, and have a DNS domain for it, such as mynetwork.invalid. Let's also say you are running your own DNS server, so any DNS requests for anything ending in mynetwork.invalid come to your DNS server. Now, let's say you have a couple servers, such as FTP, a Web server, etc. You'll have to create a record on your DNS server for each machine, and www was more a less a standard for Web servers in a network. So then ftp.mynetwork.invalid would point to your FTP server, and www.mynetwork.invalid would point to your Web server, etc.



              You might choose to have the plain old mynetwork.invalid pointing to the most common service you run, such as the Web server, to save people from typing a lot and make your URLs look better, but if someone enters simply mynetwork.invalid on an FTP client, there will be problems.



              However, most modern sites are only running one service, not a bunch of servers running a bunch of different servers. So then a shortcut is taken - mynetwork.invalid is the only one used, and you might create a second DNS entry www.mynetwork.invalid pointing to the same IP just for compatibility or those who are used to typing it.








            share|improve this answer



















            • 4





              Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

              – fixer1234
              Mar 9 '15 at 2:31











            • I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

              – siamak
              Mar 9 '15 at 9:12











            • To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

              – LawrenceC
              Mar 9 '15 at 11:21











            • @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

              – siamak
              Mar 9 '15 at 12:52











            • To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

              – LawrenceC
              Mar 9 '15 at 15:56













            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f887173%2fwhat-is-a-hostname-versus-a-computer-name-versus-a-subdomain-versus-www%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            20














            The best way to explain the differences between these different items—that are related but different—is to break it down by example. Think of networks like a tree:




            • There is a trunk that separates into major branches.

            • Branches which in turn separate into smaller branches.

            • Smaller branches eventually leading to individual leaves.


            The “trunk” and “branches” are “domains” and “subdomains” and the leaves are individual devices, like computers. So let’s start there.




            • A “computer name” is strictly a local convention: I have a computer named jakegould. This computer name is simply the name I have assigned my local machine. Nobody outside of my LAN will know this computer name; this is strictly a local setting.



            • A “hostname” (aka “nodename”) is a network identifier: If I wanted to publicly advertise my local computer to others, I would have to attach a “hostname” to the IP address of my computer. The “hostname” doesn’t really have to have anything to do with the computer name, but many times administrators like to use the same name to make things easier to understand. Also a “hostname” doesn’t always mean the computer is exposed to the Internet; it’s just an easy way to let others on your network where/what your computer is. As Wikipedia explains; emphasis is mine:




              In computer networking, a hostname (archaically nodename) is a
              label that is assigned to a device connected to a computer network
              and
              that is used to identify the device in various forms of electronic
              communication such as the World Wide Web, e-mail or Usenet.





            • A fully qualified domain name (FQDN) is just that; a fully qualified domain name: Now that might seem confusing but you need to think of it this way: It just means in the great scheme of things, what is the actual “path” to get to a computer. So let’s say I have my computer named jakegould and it has a hostname on my LAN that is jakegould. Within the context of my LAN, that jakegould is my computer name, and is my “hostname” and can possibly be considered my “fully qualified domain name” depending on my LAN architecture. Meaning let’s say my office LAN has other nodes in it like, first_floor and second_floor and my “hostname” of jakegould is on the second_floor network. Well, if that were the case, then my LAN-based “fully qualified domain name” would be jakegould.second_floor and that is it. But let’s say I worked at a big company named “big_company.com” and my computer were somehow exposed to the world. Then in that case, my WAN-based “fully qualified domain name” could be jakegould.second_floor.big_company.com or maybe even just jakegould.big_company.com if the network administrator didn’t want to be hassled with the “second_floor” designation. Again, as Wikipedia explains; emphasis is mine:




              A fully qualified domain name (FQDN), sometimes also referred to as an
              absolute domain name, is a domain name that specifies its exact
              location in the tree hierarchy of the Domain Name System (DNS). It
              specifies all domain levels, including the top-level domain and the
              root zone. A fully qualified domain name is distinguished by its lack
              of ambiguity: it can be interpreted only in one way.




            • The “www” in some website names is a “hostname” designation that is historical in nature: Basically, back in the 1990s when the world wide web was still in it’s infancy, networks had many different services attached to them. And mainly in an academic context. So there would be a place like whattsamattau.edu and that school would have FTP services on ftp.whattsamattau.edu, email on mail.whattsamattau.edu and so on… So when the world wide web came along, they would just have placed the web server on www.whattsamattau.edu. Nowadays, everyone—and seemingly everything in the world—has a website. And many people just register domains just for the web service. So the historic convention of www is discarded in many cases. Many people have websites without www but will still have accommodations to redirect www traffic to the main, non-www hostname. But technically speaking, www can still be considered a hostname.



            • BONUS (Never Asked But Mentioned/Implied): What is a “subdomain” in the great scheme of things: A subdomain is basically just a child of a parent domain/hostname. So in my example of jakegould.big_company.com the jakegould can be considered a subdomain of big_company.com and big_company in that can be considered to be the “domain” with .com being the top-level domain (TLD). Yet again, as Wikipedia explains; emphasis is mine:




              In the Domain Name System (DNS) hierarchy, a subdomain is a domain
              that is part of a larger domain.





            Now after drafting all of this, it can be confusing. Many computer names are hostnames are fully-qualified domain names and in some cases they could be subdomains. It’s all a matter of context. And looking at articles online the words “domain,” “host” and “node” are used fairly loose and fast all over the place. So in my opinion, many uses of these terms are synonymous.



            Which also helps to explain your confusion in item number 2:




            If “mail” in mail.google.com and “developers” in
            developers.google.com are called subdomains why is en in
            en.wikipedia.org called hostname? What is the difference
            between host name and subdomain?




            The en.wikipedia.org is a subdomain and a hostname. The en in the en.wikipedia.org is a subdomain of the domain name wikipedia.org. And en.wikipedia.org is in itself a hostname since en.wikipedia.org has an IP address connected to it and thus a computer connected to that IP address as well. Meaning the en itself is semantically considered a subdomain, but it is also a hostname because there is a host (computer) connected to the IP address connected to en.wikipedia.org. So knowing that mail.google.com and developers.google.com are hostnames as well which are both subdomains of google.com.



            To possibly make things clearer think of it like this; let’s use the non-existant subdomain fakename.wikipedia.org as an example:




            • The org in fakename.wikipedia.org is a top-level domain (TLD). As a top-level domain it does not resolve to an IP address. Thus it is not a hostname. It is simply a naming convention.

            • The wikipedia.org in fakename.wikipedia.org is a domain name and it has the potential to be a hostname as well if it is connected to an IP address and resolves to a computer when one goes to wikipedia.org.

            • The fakename in fakename.wikipedia.org is a subdomain name since it is a child domain of wikipedia.org in the context of the domain name itself. It can be a hostname if it connected to an IP address and resolves to a computer when one goes to fakename.wikipedia.org.


            If you ping fakename.wikipedia.org you are attempting to ping the fakename subdomain of wikipedia.org. If that ping dies—which it most likely will since it is fake—that means that the host is down or it does not exist. If it dies with an IP address connected to it, that would mean the hostname fakename.wikipedia.org is down. If the ping dies with 100% no IP address connected to it, them it would mean that the subdomain fakename.wikipedia.org is an invalid hostname.



            Yes, this can all be confusing. But what it boils down to is the difference between what a domain/subdomain is in the context of DNS entries versus what domain/subdomain is in the context of having a host/computer connected to it.



            So if this all started with your curiosity about www, that is a historic hostname/nodename/subdomain that is not really used as a convention as much anymore but is still so commonly used that many sites have some accommodations in place to “catch” requests to www and redirect them to the main hostname of a website.






            share|improve this answer






























              20














              The best way to explain the differences between these different items—that are related but different—is to break it down by example. Think of networks like a tree:




              • There is a trunk that separates into major branches.

              • Branches which in turn separate into smaller branches.

              • Smaller branches eventually leading to individual leaves.


              The “trunk” and “branches” are “domains” and “subdomains” and the leaves are individual devices, like computers. So let’s start there.




              • A “computer name” is strictly a local convention: I have a computer named jakegould. This computer name is simply the name I have assigned my local machine. Nobody outside of my LAN will know this computer name; this is strictly a local setting.



              • A “hostname” (aka “nodename”) is a network identifier: If I wanted to publicly advertise my local computer to others, I would have to attach a “hostname” to the IP address of my computer. The “hostname” doesn’t really have to have anything to do with the computer name, but many times administrators like to use the same name to make things easier to understand. Also a “hostname” doesn’t always mean the computer is exposed to the Internet; it’s just an easy way to let others on your network where/what your computer is. As Wikipedia explains; emphasis is mine:




                In computer networking, a hostname (archaically nodename) is a
                label that is assigned to a device connected to a computer network
                and
                that is used to identify the device in various forms of electronic
                communication such as the World Wide Web, e-mail or Usenet.





              • A fully qualified domain name (FQDN) is just that; a fully qualified domain name: Now that might seem confusing but you need to think of it this way: It just means in the great scheme of things, what is the actual “path” to get to a computer. So let’s say I have my computer named jakegould and it has a hostname on my LAN that is jakegould. Within the context of my LAN, that jakegould is my computer name, and is my “hostname” and can possibly be considered my “fully qualified domain name” depending on my LAN architecture. Meaning let’s say my office LAN has other nodes in it like, first_floor and second_floor and my “hostname” of jakegould is on the second_floor network. Well, if that were the case, then my LAN-based “fully qualified domain name” would be jakegould.second_floor and that is it. But let’s say I worked at a big company named “big_company.com” and my computer were somehow exposed to the world. Then in that case, my WAN-based “fully qualified domain name” could be jakegould.second_floor.big_company.com or maybe even just jakegould.big_company.com if the network administrator didn’t want to be hassled with the “second_floor” designation. Again, as Wikipedia explains; emphasis is mine:




                A fully qualified domain name (FQDN), sometimes also referred to as an
                absolute domain name, is a domain name that specifies its exact
                location in the tree hierarchy of the Domain Name System (DNS). It
                specifies all domain levels, including the top-level domain and the
                root zone. A fully qualified domain name is distinguished by its lack
                of ambiguity: it can be interpreted only in one way.




              • The “www” in some website names is a “hostname” designation that is historical in nature: Basically, back in the 1990s when the world wide web was still in it’s infancy, networks had many different services attached to them. And mainly in an academic context. So there would be a place like whattsamattau.edu and that school would have FTP services on ftp.whattsamattau.edu, email on mail.whattsamattau.edu and so on… So when the world wide web came along, they would just have placed the web server on www.whattsamattau.edu. Nowadays, everyone—and seemingly everything in the world—has a website. And many people just register domains just for the web service. So the historic convention of www is discarded in many cases. Many people have websites without www but will still have accommodations to redirect www traffic to the main, non-www hostname. But technically speaking, www can still be considered a hostname.



              • BONUS (Never Asked But Mentioned/Implied): What is a “subdomain” in the great scheme of things: A subdomain is basically just a child of a parent domain/hostname. So in my example of jakegould.big_company.com the jakegould can be considered a subdomain of big_company.com and big_company in that can be considered to be the “domain” with .com being the top-level domain (TLD). Yet again, as Wikipedia explains; emphasis is mine:




                In the Domain Name System (DNS) hierarchy, a subdomain is a domain
                that is part of a larger domain.





              Now after drafting all of this, it can be confusing. Many computer names are hostnames are fully-qualified domain names and in some cases they could be subdomains. It’s all a matter of context. And looking at articles online the words “domain,” “host” and “node” are used fairly loose and fast all over the place. So in my opinion, many uses of these terms are synonymous.



              Which also helps to explain your confusion in item number 2:




              If “mail” in mail.google.com and “developers” in
              developers.google.com are called subdomains why is en in
              en.wikipedia.org called hostname? What is the difference
              between host name and subdomain?




              The en.wikipedia.org is a subdomain and a hostname. The en in the en.wikipedia.org is a subdomain of the domain name wikipedia.org. And en.wikipedia.org is in itself a hostname since en.wikipedia.org has an IP address connected to it and thus a computer connected to that IP address as well. Meaning the en itself is semantically considered a subdomain, but it is also a hostname because there is a host (computer) connected to the IP address connected to en.wikipedia.org. So knowing that mail.google.com and developers.google.com are hostnames as well which are both subdomains of google.com.



              To possibly make things clearer think of it like this; let’s use the non-existant subdomain fakename.wikipedia.org as an example:




              • The org in fakename.wikipedia.org is a top-level domain (TLD). As a top-level domain it does not resolve to an IP address. Thus it is not a hostname. It is simply a naming convention.

              • The wikipedia.org in fakename.wikipedia.org is a domain name and it has the potential to be a hostname as well if it is connected to an IP address and resolves to a computer when one goes to wikipedia.org.

              • The fakename in fakename.wikipedia.org is a subdomain name since it is a child domain of wikipedia.org in the context of the domain name itself. It can be a hostname if it connected to an IP address and resolves to a computer when one goes to fakename.wikipedia.org.


              If you ping fakename.wikipedia.org you are attempting to ping the fakename subdomain of wikipedia.org. If that ping dies—which it most likely will since it is fake—that means that the host is down or it does not exist. If it dies with an IP address connected to it, that would mean the hostname fakename.wikipedia.org is down. If the ping dies with 100% no IP address connected to it, them it would mean that the subdomain fakename.wikipedia.org is an invalid hostname.



              Yes, this can all be confusing. But what it boils down to is the difference between what a domain/subdomain is in the context of DNS entries versus what domain/subdomain is in the context of having a host/computer connected to it.



              So if this all started with your curiosity about www, that is a historic hostname/nodename/subdomain that is not really used as a convention as much anymore but is still so commonly used that many sites have some accommodations in place to “catch” requests to www and redirect them to the main hostname of a website.






              share|improve this answer




























                20












                20








                20







                The best way to explain the differences between these different items—that are related but different—is to break it down by example. Think of networks like a tree:




                • There is a trunk that separates into major branches.

                • Branches which in turn separate into smaller branches.

                • Smaller branches eventually leading to individual leaves.


                The “trunk” and “branches” are “domains” and “subdomains” and the leaves are individual devices, like computers. So let’s start there.




                • A “computer name” is strictly a local convention: I have a computer named jakegould. This computer name is simply the name I have assigned my local machine. Nobody outside of my LAN will know this computer name; this is strictly a local setting.



                • A “hostname” (aka “nodename”) is a network identifier: If I wanted to publicly advertise my local computer to others, I would have to attach a “hostname” to the IP address of my computer. The “hostname” doesn’t really have to have anything to do with the computer name, but many times administrators like to use the same name to make things easier to understand. Also a “hostname” doesn’t always mean the computer is exposed to the Internet; it’s just an easy way to let others on your network where/what your computer is. As Wikipedia explains; emphasis is mine:




                  In computer networking, a hostname (archaically nodename) is a
                  label that is assigned to a device connected to a computer network
                  and
                  that is used to identify the device in various forms of electronic
                  communication such as the World Wide Web, e-mail or Usenet.





                • A fully qualified domain name (FQDN) is just that; a fully qualified domain name: Now that might seem confusing but you need to think of it this way: It just means in the great scheme of things, what is the actual “path” to get to a computer. So let’s say I have my computer named jakegould and it has a hostname on my LAN that is jakegould. Within the context of my LAN, that jakegould is my computer name, and is my “hostname” and can possibly be considered my “fully qualified domain name” depending on my LAN architecture. Meaning let’s say my office LAN has other nodes in it like, first_floor and second_floor and my “hostname” of jakegould is on the second_floor network. Well, if that were the case, then my LAN-based “fully qualified domain name” would be jakegould.second_floor and that is it. But let’s say I worked at a big company named “big_company.com” and my computer were somehow exposed to the world. Then in that case, my WAN-based “fully qualified domain name” could be jakegould.second_floor.big_company.com or maybe even just jakegould.big_company.com if the network administrator didn’t want to be hassled with the “second_floor” designation. Again, as Wikipedia explains; emphasis is mine:




                  A fully qualified domain name (FQDN), sometimes also referred to as an
                  absolute domain name, is a domain name that specifies its exact
                  location in the tree hierarchy of the Domain Name System (DNS). It
                  specifies all domain levels, including the top-level domain and the
                  root zone. A fully qualified domain name is distinguished by its lack
                  of ambiguity: it can be interpreted only in one way.




                • The “www” in some website names is a “hostname” designation that is historical in nature: Basically, back in the 1990s when the world wide web was still in it’s infancy, networks had many different services attached to them. And mainly in an academic context. So there would be a place like whattsamattau.edu and that school would have FTP services on ftp.whattsamattau.edu, email on mail.whattsamattau.edu and so on… So when the world wide web came along, they would just have placed the web server on www.whattsamattau.edu. Nowadays, everyone—and seemingly everything in the world—has a website. And many people just register domains just for the web service. So the historic convention of www is discarded in many cases. Many people have websites without www but will still have accommodations to redirect www traffic to the main, non-www hostname. But technically speaking, www can still be considered a hostname.



                • BONUS (Never Asked But Mentioned/Implied): What is a “subdomain” in the great scheme of things: A subdomain is basically just a child of a parent domain/hostname. So in my example of jakegould.big_company.com the jakegould can be considered a subdomain of big_company.com and big_company in that can be considered to be the “domain” with .com being the top-level domain (TLD). Yet again, as Wikipedia explains; emphasis is mine:




                  In the Domain Name System (DNS) hierarchy, a subdomain is a domain
                  that is part of a larger domain.





                Now after drafting all of this, it can be confusing. Many computer names are hostnames are fully-qualified domain names and in some cases they could be subdomains. It’s all a matter of context. And looking at articles online the words “domain,” “host” and “node” are used fairly loose and fast all over the place. So in my opinion, many uses of these terms are synonymous.



                Which also helps to explain your confusion in item number 2:




                If “mail” in mail.google.com and “developers” in
                developers.google.com are called subdomains why is en in
                en.wikipedia.org called hostname? What is the difference
                between host name and subdomain?




                The en.wikipedia.org is a subdomain and a hostname. The en in the en.wikipedia.org is a subdomain of the domain name wikipedia.org. And en.wikipedia.org is in itself a hostname since en.wikipedia.org has an IP address connected to it and thus a computer connected to that IP address as well. Meaning the en itself is semantically considered a subdomain, but it is also a hostname because there is a host (computer) connected to the IP address connected to en.wikipedia.org. So knowing that mail.google.com and developers.google.com are hostnames as well which are both subdomains of google.com.



                To possibly make things clearer think of it like this; let’s use the non-existant subdomain fakename.wikipedia.org as an example:




                • The org in fakename.wikipedia.org is a top-level domain (TLD). As a top-level domain it does not resolve to an IP address. Thus it is not a hostname. It is simply a naming convention.

                • The wikipedia.org in fakename.wikipedia.org is a domain name and it has the potential to be a hostname as well if it is connected to an IP address and resolves to a computer when one goes to wikipedia.org.

                • The fakename in fakename.wikipedia.org is a subdomain name since it is a child domain of wikipedia.org in the context of the domain name itself. It can be a hostname if it connected to an IP address and resolves to a computer when one goes to fakename.wikipedia.org.


                If you ping fakename.wikipedia.org you are attempting to ping the fakename subdomain of wikipedia.org. If that ping dies—which it most likely will since it is fake—that means that the host is down or it does not exist. If it dies with an IP address connected to it, that would mean the hostname fakename.wikipedia.org is down. If the ping dies with 100% no IP address connected to it, them it would mean that the subdomain fakename.wikipedia.org is an invalid hostname.



                Yes, this can all be confusing. But what it boils down to is the difference between what a domain/subdomain is in the context of DNS entries versus what domain/subdomain is in the context of having a host/computer connected to it.



                So if this all started with your curiosity about www, that is a historic hostname/nodename/subdomain that is not really used as a convention as much anymore but is still so commonly used that many sites have some accommodations in place to “catch” requests to www and redirect them to the main hostname of a website.






                share|improve this answer















                The best way to explain the differences between these different items—that are related but different—is to break it down by example. Think of networks like a tree:




                • There is a trunk that separates into major branches.

                • Branches which in turn separate into smaller branches.

                • Smaller branches eventually leading to individual leaves.


                The “trunk” and “branches” are “domains” and “subdomains” and the leaves are individual devices, like computers. So let’s start there.




                • A “computer name” is strictly a local convention: I have a computer named jakegould. This computer name is simply the name I have assigned my local machine. Nobody outside of my LAN will know this computer name; this is strictly a local setting.



                • A “hostname” (aka “nodename”) is a network identifier: If I wanted to publicly advertise my local computer to others, I would have to attach a “hostname” to the IP address of my computer. The “hostname” doesn’t really have to have anything to do with the computer name, but many times administrators like to use the same name to make things easier to understand. Also a “hostname” doesn’t always mean the computer is exposed to the Internet; it’s just an easy way to let others on your network where/what your computer is. As Wikipedia explains; emphasis is mine:




                  In computer networking, a hostname (archaically nodename) is a
                  label that is assigned to a device connected to a computer network
                  and
                  that is used to identify the device in various forms of electronic
                  communication such as the World Wide Web, e-mail or Usenet.





                • A fully qualified domain name (FQDN) is just that; a fully qualified domain name: Now that might seem confusing but you need to think of it this way: It just means in the great scheme of things, what is the actual “path” to get to a computer. So let’s say I have my computer named jakegould and it has a hostname on my LAN that is jakegould. Within the context of my LAN, that jakegould is my computer name, and is my “hostname” and can possibly be considered my “fully qualified domain name” depending on my LAN architecture. Meaning let’s say my office LAN has other nodes in it like, first_floor and second_floor and my “hostname” of jakegould is on the second_floor network. Well, if that were the case, then my LAN-based “fully qualified domain name” would be jakegould.second_floor and that is it. But let’s say I worked at a big company named “big_company.com” and my computer were somehow exposed to the world. Then in that case, my WAN-based “fully qualified domain name” could be jakegould.second_floor.big_company.com or maybe even just jakegould.big_company.com if the network administrator didn’t want to be hassled with the “second_floor” designation. Again, as Wikipedia explains; emphasis is mine:




                  A fully qualified domain name (FQDN), sometimes also referred to as an
                  absolute domain name, is a domain name that specifies its exact
                  location in the tree hierarchy of the Domain Name System (DNS). It
                  specifies all domain levels, including the top-level domain and the
                  root zone. A fully qualified domain name is distinguished by its lack
                  of ambiguity: it can be interpreted only in one way.




                • The “www” in some website names is a “hostname” designation that is historical in nature: Basically, back in the 1990s when the world wide web was still in it’s infancy, networks had many different services attached to them. And mainly in an academic context. So there would be a place like whattsamattau.edu and that school would have FTP services on ftp.whattsamattau.edu, email on mail.whattsamattau.edu and so on… So when the world wide web came along, they would just have placed the web server on www.whattsamattau.edu. Nowadays, everyone—and seemingly everything in the world—has a website. And many people just register domains just for the web service. So the historic convention of www is discarded in many cases. Many people have websites without www but will still have accommodations to redirect www traffic to the main, non-www hostname. But technically speaking, www can still be considered a hostname.



                • BONUS (Never Asked But Mentioned/Implied): What is a “subdomain” in the great scheme of things: A subdomain is basically just a child of a parent domain/hostname. So in my example of jakegould.big_company.com the jakegould can be considered a subdomain of big_company.com and big_company in that can be considered to be the “domain” with .com being the top-level domain (TLD). Yet again, as Wikipedia explains; emphasis is mine:




                  In the Domain Name System (DNS) hierarchy, a subdomain is a domain
                  that is part of a larger domain.





                Now after drafting all of this, it can be confusing. Many computer names are hostnames are fully-qualified domain names and in some cases they could be subdomains. It’s all a matter of context. And looking at articles online the words “domain,” “host” and “node” are used fairly loose and fast all over the place. So in my opinion, many uses of these terms are synonymous.



                Which also helps to explain your confusion in item number 2:




                If “mail” in mail.google.com and “developers” in
                developers.google.com are called subdomains why is en in
                en.wikipedia.org called hostname? What is the difference
                between host name and subdomain?




                The en.wikipedia.org is a subdomain and a hostname. The en in the en.wikipedia.org is a subdomain of the domain name wikipedia.org. And en.wikipedia.org is in itself a hostname since en.wikipedia.org has an IP address connected to it and thus a computer connected to that IP address as well. Meaning the en itself is semantically considered a subdomain, but it is also a hostname because there is a host (computer) connected to the IP address connected to en.wikipedia.org. So knowing that mail.google.com and developers.google.com are hostnames as well which are both subdomains of google.com.



                To possibly make things clearer think of it like this; let’s use the non-existant subdomain fakename.wikipedia.org as an example:




                • The org in fakename.wikipedia.org is a top-level domain (TLD). As a top-level domain it does not resolve to an IP address. Thus it is not a hostname. It is simply a naming convention.

                • The wikipedia.org in fakename.wikipedia.org is a domain name and it has the potential to be a hostname as well if it is connected to an IP address and resolves to a computer when one goes to wikipedia.org.

                • The fakename in fakename.wikipedia.org is a subdomain name since it is a child domain of wikipedia.org in the context of the domain name itself. It can be a hostname if it connected to an IP address and resolves to a computer when one goes to fakename.wikipedia.org.


                If you ping fakename.wikipedia.org you are attempting to ping the fakename subdomain of wikipedia.org. If that ping dies—which it most likely will since it is fake—that means that the host is down or it does not exist. If it dies with an IP address connected to it, that would mean the hostname fakename.wikipedia.org is down. If the ping dies with 100% no IP address connected to it, them it would mean that the subdomain fakename.wikipedia.org is an invalid hostname.



                Yes, this can all be confusing. But what it boils down to is the difference between what a domain/subdomain is in the context of DNS entries versus what domain/subdomain is in the context of having a host/computer connected to it.



                So if this all started with your curiosity about www, that is a historic hostname/nodename/subdomain that is not really used as a convention as much anymore but is still so commonly used that many sites have some accommodations in place to “catch” requests to www and redirect them to the main hostname of a website.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Sep 28 '18 at 14:46









                railgun

                10914




                10914










                answered Mar 9 '15 at 2:11









                JakeGouldJakeGould

                31.2k1094137




                31.2k1094137

























                    2















                    1. Hostname is an attribute of a system stored locally on that system. "Computer name" is what Windows uses to refer to the hostname.



                    2. A subdomain is a DNS concept. In DNS, domain names (domains for short) can be authoritative or non-authoritative - if they are non-authoritative, that means another server "handles" that domain. So in a domain such as www.mysite.invalid - one thing that could happen is that the root domain refers a lookup to a server handling the invalid domain, which then further refers the lookup to a server handling the mysite domain, etc.



                      Your system might keep track of the domain it thinks it's on as well as a locally managed hostname.




                    3. You can change your computer's local hostname, but this won't automatically update any DNS server pointed to your machine unless you have software specifically doing that (such as Active Directory in a corporate Windows environment).



                      Many DHCP clients are also capable of changing a computer's local hostname in response to a DHCP response from a DHCP server.



                      Typically a system's internal hostname and external DNS name will match, but they don't have to, though 99% of time you want them to.



                      You can set your computer's hostname to the same as its full external DNS, and it usually makes sense to do so.




                    4. Let's say you run a network somewhere, and have a DNS domain for it, such as mynetwork.invalid. Let's also say you are running your own DNS server, so any DNS requests for anything ending in mynetwork.invalid come to your DNS server. Now, let's say you have a couple servers, such as FTP, a Web server, etc. You'll have to create a record on your DNS server for each machine, and www was more a less a standard for Web servers in a network. So then ftp.mynetwork.invalid would point to your FTP server, and www.mynetwork.invalid would point to your Web server, etc.



                      You might choose to have the plain old mynetwork.invalid pointing to the most common service you run, such as the Web server, to save people from typing a lot and make your URLs look better, but if someone enters simply mynetwork.invalid on an FTP client, there will be problems.



                      However, most modern sites are only running one service, not a bunch of servers running a bunch of different servers. So then a shortcut is taken - mynetwork.invalid is the only one used, and you might create a second DNS entry www.mynetwork.invalid pointing to the same IP just for compatibility or those who are used to typing it.








                    share|improve this answer



















                    • 4





                      Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                      – fixer1234
                      Mar 9 '15 at 2:31











                    • I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                      – siamak
                      Mar 9 '15 at 9:12











                    • To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                      – LawrenceC
                      Mar 9 '15 at 11:21











                    • @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                      – siamak
                      Mar 9 '15 at 12:52











                    • To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                      – LawrenceC
                      Mar 9 '15 at 15:56


















                    2















                    1. Hostname is an attribute of a system stored locally on that system. "Computer name" is what Windows uses to refer to the hostname.



                    2. A subdomain is a DNS concept. In DNS, domain names (domains for short) can be authoritative or non-authoritative - if they are non-authoritative, that means another server "handles" that domain. So in a domain such as www.mysite.invalid - one thing that could happen is that the root domain refers a lookup to a server handling the invalid domain, which then further refers the lookup to a server handling the mysite domain, etc.



                      Your system might keep track of the domain it thinks it's on as well as a locally managed hostname.




                    3. You can change your computer's local hostname, but this won't automatically update any DNS server pointed to your machine unless you have software specifically doing that (such as Active Directory in a corporate Windows environment).



                      Many DHCP clients are also capable of changing a computer's local hostname in response to a DHCP response from a DHCP server.



                      Typically a system's internal hostname and external DNS name will match, but they don't have to, though 99% of time you want them to.



                      You can set your computer's hostname to the same as its full external DNS, and it usually makes sense to do so.




                    4. Let's say you run a network somewhere, and have a DNS domain for it, such as mynetwork.invalid. Let's also say you are running your own DNS server, so any DNS requests for anything ending in mynetwork.invalid come to your DNS server. Now, let's say you have a couple servers, such as FTP, a Web server, etc. You'll have to create a record on your DNS server for each machine, and www was more a less a standard for Web servers in a network. So then ftp.mynetwork.invalid would point to your FTP server, and www.mynetwork.invalid would point to your Web server, etc.



                      You might choose to have the plain old mynetwork.invalid pointing to the most common service you run, such as the Web server, to save people from typing a lot and make your URLs look better, but if someone enters simply mynetwork.invalid on an FTP client, there will be problems.



                      However, most modern sites are only running one service, not a bunch of servers running a bunch of different servers. So then a shortcut is taken - mynetwork.invalid is the only one used, and you might create a second DNS entry www.mynetwork.invalid pointing to the same IP just for compatibility or those who are used to typing it.








                    share|improve this answer



















                    • 4





                      Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                      – fixer1234
                      Mar 9 '15 at 2:31











                    • I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                      – siamak
                      Mar 9 '15 at 9:12











                    • To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                      – LawrenceC
                      Mar 9 '15 at 11:21











                    • @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                      – siamak
                      Mar 9 '15 at 12:52











                    • To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                      – LawrenceC
                      Mar 9 '15 at 15:56
















                    2












                    2








                    2








                    1. Hostname is an attribute of a system stored locally on that system. "Computer name" is what Windows uses to refer to the hostname.



                    2. A subdomain is a DNS concept. In DNS, domain names (domains for short) can be authoritative or non-authoritative - if they are non-authoritative, that means another server "handles" that domain. So in a domain such as www.mysite.invalid - one thing that could happen is that the root domain refers a lookup to a server handling the invalid domain, which then further refers the lookup to a server handling the mysite domain, etc.



                      Your system might keep track of the domain it thinks it's on as well as a locally managed hostname.




                    3. You can change your computer's local hostname, but this won't automatically update any DNS server pointed to your machine unless you have software specifically doing that (such as Active Directory in a corporate Windows environment).



                      Many DHCP clients are also capable of changing a computer's local hostname in response to a DHCP response from a DHCP server.



                      Typically a system's internal hostname and external DNS name will match, but they don't have to, though 99% of time you want them to.



                      You can set your computer's hostname to the same as its full external DNS, and it usually makes sense to do so.




                    4. Let's say you run a network somewhere, and have a DNS domain for it, such as mynetwork.invalid. Let's also say you are running your own DNS server, so any DNS requests for anything ending in mynetwork.invalid come to your DNS server. Now, let's say you have a couple servers, such as FTP, a Web server, etc. You'll have to create a record on your DNS server for each machine, and www was more a less a standard for Web servers in a network. So then ftp.mynetwork.invalid would point to your FTP server, and www.mynetwork.invalid would point to your Web server, etc.



                      You might choose to have the plain old mynetwork.invalid pointing to the most common service you run, such as the Web server, to save people from typing a lot and make your URLs look better, but if someone enters simply mynetwork.invalid on an FTP client, there will be problems.



                      However, most modern sites are only running one service, not a bunch of servers running a bunch of different servers. So then a shortcut is taken - mynetwork.invalid is the only one used, and you might create a second DNS entry www.mynetwork.invalid pointing to the same IP just for compatibility or those who are used to typing it.








                    share|improve this answer














                    1. Hostname is an attribute of a system stored locally on that system. "Computer name" is what Windows uses to refer to the hostname.



                    2. A subdomain is a DNS concept. In DNS, domain names (domains for short) can be authoritative or non-authoritative - if they are non-authoritative, that means another server "handles" that domain. So in a domain such as www.mysite.invalid - one thing that could happen is that the root domain refers a lookup to a server handling the invalid domain, which then further refers the lookup to a server handling the mysite domain, etc.



                      Your system might keep track of the domain it thinks it's on as well as a locally managed hostname.




                    3. You can change your computer's local hostname, but this won't automatically update any DNS server pointed to your machine unless you have software specifically doing that (such as Active Directory in a corporate Windows environment).



                      Many DHCP clients are also capable of changing a computer's local hostname in response to a DHCP response from a DHCP server.



                      Typically a system's internal hostname and external DNS name will match, but they don't have to, though 99% of time you want them to.



                      You can set your computer's hostname to the same as its full external DNS, and it usually makes sense to do so.




                    4. Let's say you run a network somewhere, and have a DNS domain for it, such as mynetwork.invalid. Let's also say you are running your own DNS server, so any DNS requests for anything ending in mynetwork.invalid come to your DNS server. Now, let's say you have a couple servers, such as FTP, a Web server, etc. You'll have to create a record on your DNS server for each machine, and www was more a less a standard for Web servers in a network. So then ftp.mynetwork.invalid would point to your FTP server, and www.mynetwork.invalid would point to your Web server, etc.



                      You might choose to have the plain old mynetwork.invalid pointing to the most common service you run, such as the Web server, to save people from typing a lot and make your URLs look better, but if someone enters simply mynetwork.invalid on an FTP client, there will be problems.



                      However, most modern sites are only running one service, not a bunch of servers running a bunch of different servers. So then a shortcut is taken - mynetwork.invalid is the only one used, and you might create a second DNS entry www.mynetwork.invalid pointing to the same IP just for compatibility or those who are used to typing it.









                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 9 '15 at 2:09









                    LawrenceCLawrenceC

                    58.9k10102179




                    58.9k10102179








                    • 4





                      Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                      – fixer1234
                      Mar 9 '15 at 2:31











                    • I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                      – siamak
                      Mar 9 '15 at 9:12











                    • To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                      – LawrenceC
                      Mar 9 '15 at 11:21











                    • @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                      – siamak
                      Mar 9 '15 at 12:52











                    • To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                      – LawrenceC
                      Mar 9 '15 at 15:56
















                    • 4





                      Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                      – fixer1234
                      Mar 9 '15 at 2:31











                    • I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                      – siamak
                      Mar 9 '15 at 9:12











                    • To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                      – LawrenceC
                      Mar 9 '15 at 11:21











                    • @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                      – siamak
                      Mar 9 '15 at 12:52











                    • To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                      – LawrenceC
                      Mar 9 '15 at 15:56










                    4




                    4





                    Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                    – fixer1234
                    Mar 9 '15 at 2:31





                    Just a suggestion: your answer assumes a certain level of knowledge about networking, how it all works, related terminology, etc. The OP obviously lacks all of that. Can you "dumb down" your answer to plain language, explain terminology, etc.? Your answer is fairly thorough, but understandable only to people who don't need the answer to this question.

                    – fixer1234
                    Mar 9 '15 at 2:31













                    I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                    – siamak
                    Mar 9 '15 at 9:12





                    I think one of my questions has left unanswered.In wiki example: en.wikipedia.org/wiki/Hostname "en" called "hostname" not subdomain.But in many the same structures like developers.google.com "first part" called subdomain!! Now I want to know which is correct? I think wiki example is wrong, what is your idea?

                    – siamak
                    Mar 9 '15 at 9:12













                    To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                    – LawrenceC
                    Mar 9 '15 at 11:21





                    To say "hostname" in this situation - you are emphasizing that the "en" is not a subdomain, it's a computer you connect to. It's local hostname is probably "en" but you can't tell just from the FQDN, but it doesn't matter since you don't need to know the local hostname to connect.

                    – LawrenceC
                    Mar 9 '15 at 11:21













                    @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                    – siamak
                    Mar 9 '15 at 12:52





                    @ultrasawblade : you mean that by looking at this structure :firstpart.websitename.com, its not possible to conclude that "the firstpart" is a host name or a subdomain,am I right?

                    – siamak
                    Mar 9 '15 at 12:52













                    To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                    – LawrenceC
                    Mar 9 '15 at 15:56







                    To be absolutely sure you want to use a utility like dig - you can play with an online version here: digwebinterface.com. As an exercise, enter edu, then mit.edu, then www.mit.edu and compare the results. "SOA" is a DNS record that says "another server handles anything in this subdomain" - "A", "PTR", and "CNAME" records are (pointers/aliases to) names/IPs of actual hosts.

                    – LawrenceC
                    Mar 9 '15 at 15:56




















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f887173%2fwhat-is-a-hostname-versus-a-computer-name-versus-a-subdomain-versus-www%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Mouse cursor on multiple screens with different PPI

                    Agildo Ribeiro

                    Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”