3 ms·
Referring to the standard 'www' in www.example.com as a sub-domain may be a colloquialism, and it's probably fine in colloquial speech among non-experts. People
by mindcrime 5y ago
Referring to the standard 'www' in www.example.com as a sub-domain may be a colloquialism, and it's probably fine in colloquial speech among non-experts. People to whom the distinction matters (eg, the people configuring DNS servers, etc.) will know and understand the more technical distinction.
Anyway, the meat of the answer - at least to the way I interpret this - is contained here (from the Wikipedia "Subdomain" page)
According to RFC 1034, "a domain is a subdomain of another domain if it is contained within that domain". Based on that definition, a host cannot be a subdomain, only a domain can be a subdomain. A subdomain will also have a separate zone file with a SOA record (Start of Authority).
So technically, no, if it has an A or CNAME record and points to a host, it's not a subdomain, it's a host.
Where I guess it gets confusing, and I'm not even sure if this is possible, is if you have something like:
a.shop.example.com --> points to some host A
b.shop.example.com --> points to some host B
shop.example.com --> points to some host Q
Is "shop" both a host AND a subdomain in that case? Assuming DNS even lets you do that. I dunno... never had a reason to think about it before.
EDIT: Yeah, looks like you can have the case where a given name is both a host and a sub-domain. See:
https://serverfault.com/questions/950698/use-same-dns-name-both-as-host-name-and-subdomain https://serverfault.com/questions/950698/use-same-dns-name-b...
- aguayjabon 5y agoThanks a lot! > Based on that definition, a host cannot be a subdomain, only a domain can be a subdomain. A subdomain will also have a separate zone file with a SOA record (Start of Authority). That would seemingly confirm my line of argument that e.g. "www" is not a (sub-)domain but "just" a hostname. Now if "www" was an NS record and pointed to a nameserver with its own SOA record, then that would be a sub-domain of course, but of course I was only referring to A and CNAME records. > Is "shop" both a host AND a subdomain in that case? AFAIK, having NS records won't allow you to define additional records, hence that shop A record could only be part of the shop domain as part of the naked domain. In that case I'd say "shop" is just as much a domain as "example.com".