0

The definition of a hostname according to Wikipedia is:

“A LABEL that is assigned to a device connected to a computer network and that is used to identify the device.”

And I've been told that for this fully qualified domain name (FQDN): en.wikipedia.org, the en part is a hostname.

Does this mean that if I make a website called www.example.com, there is a singular device inside the domain example.com which has the hostname called www? And does this mean that if this singular device with the label www goes offline or whatever reason, all my users would not be able to reach www.example.com?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
user8380672
  • 101
  • 3

3 Answers3

1

“Does this mean that if I make a website called www.mywebsite.com, there is a singular device inside the domain example.com which has the hostname called www? And does this mean that if this singular device with the label www goes offline or whatever reason, all my users would not be able to reach www.example.com?”

Yes. That is correct.

I think part of your confusion is you are mixing up domain/hostname info with the actual destination IP addresses connected to that.

All DNS entries like example.com and www are are alias that point to IP addresses. How you assign those IP addresses and where they go to is up to you.

So you can have a structure like this:

  • www.example.com: Points to one IP address like 1.2.3.4.
  • example.com: Points to another IP address like 5.6.7.8.

That means that each domain name is a different server, device, etc…

But in many cases for simple websites the architecture is like this:

  • www.example.com: Points to one IP address like 1.2.3.4.
  • example.com: Points to also points to 1.2.3.4.

The way this works is you can configure your Webservers — typically something like Apache — to respond to both hostnames. So www.example.com and example.com serves the same exact website.

But Apache can also be configured to handle virtual host configurations. So the one server at 1.2.3.4 can serve two different websites to www.example.com and example.com.

So this is all about conventions and use of DNS language. The reality is a place like Google doesn’t just have one IP address and one server for all their services. So if mail.google.com goes down, the main google.com is never affected.

Just always remember that hostnames, domains and subdomains are not codependent to whatever their destination IP address is unless you intentionally architect a system like that.

In my example of www.example.com and example.com both pointing to 1.2.3.4 many basic websites work like that purely to give the end user the convenience of getting the same content at both domain names.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
  • Then if the hostname/subdomain `www.example.com` points to `1.2.3.4` which is a SINGULAR device, doesn't that mean `example.com` which also points to `1.2.3.4` be referring to a SINGULAR device as well? And by extension, doesn't this mean that `example.com` is not a domain, as the definition of a domain is a network of computers? Additionally, wouldn't this make `example.com` also be considered a hostname as it refers to a SINGULAR device? – user8380672 Nov 23 '20 at 09:27
  • @user8380672 You are massively overthinking what a physical device is in the context of the language used for domain names. You are simply mixing up what a device is from the language used to describe DNS entries. – Giacomo1968 Nov 23 '20 at 11:19
0

Does this mean that if I make a website called www.mywebsite.com, there is a singular device inside the domain mywebsite.com which has the hostname called www?

Sort of: The Domain Name Systems (DNS) resolution relies on servers, which are usually responsible for quite a few names. For example, a big corporation somecorp.com would then have one server to resolve someservice.somecorp.com, anotherservice.somecorp.com and so on. Often these systems are also reachable by a name under this domain, like dns.somecorp.com. Nearly always there are several servers for redundancy, so you'd get dns1.somecorpt.com, dns2.somecorp.com etc.

For your website, there's usually one big group of DNS server of your hosting provider that will not only resolve yourwebsite.com, but also hiswebsite.com and herwebsite.com, and that won't be reachable by *.yourwebsite.com.

And does this mean that if this singular device with the label www goes offline or whatever reason,

That's why you have redundant groups of DNS servers: If one goes down, the others still work.

You know, people have given these problems some though over the years ...

dirkt
  • 16,421
  • 3
  • 31
  • 37
  • While this is a decent answer, you might want to look at the original poster’s — now closed — [question here](https://superuser.com/q/1603842/167207). – Giacomo1968 Nov 22 '20 at 06:07
0

This is not really how it works.

Internet works with IP addresses. Your router comes preconfigured with the IP address of a DNS server. This DNS server is interrogated to resolve domain names (example.com) into an IP address. It doesn't make a difference if it is www.example.com or example.com.

It just stands as 2 different entries on a DNS server somewhere which responds to requests to resolve those domain names. The entities responsible to register domains are registrars which are accredited by ICANN (https://www.icann.org/resources/pages/register-domain-name-2017-06-20-en). If this server goes down there are copies of it.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212