@agentcaseyThat's not actually a subdomain. It's merely a hostname.
Years ago companies like cPanel bastardized the term to describe the deployment of additional virtual host websites within the same DNS zone and origin, and it became the popular way of describing adding yet another host record to a domain.
It's not a subdomain any more than having the hostname "www". Other popular hostnames, by convention alone, are "mail", "webmail", and "ftp", among many others.
All you did was create a single A record for a hostname in a DNS zonefile and pointed it to an IP address.
To create a subdomain, one MUST "delegate" "Authority" to a child zone with two or more NS records (except in very special circumstances noted below) , referring anyone who asks to the DNS nameservers for that child, which in turn will return the results for that child domain.
If you're scratching your head, it's very commonplace so think of it like this:
SLD.TLD is administered by Joe at the university. Mary is the administrator for the entire math department on campus.
Janet runs the mathlab.
Joe delegates authority of the subdomain math.SLD.TLD to Mary with the two NS records pointing to the DNS servers she administers, and in her zonefile Mary delegates the subdomain 'lab' to Janet in the same way.
Janet has four machines in her lab and assigns an A record for each of them. Those hosts are:
www.lab.math.SLD.TLD (the webserver)
mail.lab.math.SLD.TLD (the mail server)
janet.lab.math.SLD.TLD (Janet's workstation)
student001.math.lab.SLD.TLD (workstation)
Janet also installs a NextCloud server and a WriteFreely instance on the webserver, and assigns the following hostnames corresponding to those websites with A records pointing to the IP address of the webserver (www) where she had created those virtual hosts in the Apache or Nginx config file:
NextCloud.lab.math.SLD.TLD
WriteFreely.lab.math.SLD.TLD
"TLD" is the Top-Level Domain under the root, which is expressed as ".", but usually assumed without having to use it syntactically in all notation. The Top-Level Domain is administered by the Internet Registry.
"SLD.TLD" is the Second Level Domain name registered by Joe for the university under the Top-Level Domain "TLD" at the registry.
math.SLD.TLD is a "3rd level domain", a subdomain of SLD.TLD, the "Authority" of which, was delegated to Mary by Joe.
lab.math.SLD.TLD is a "4th level domain", a subdomain of math.SLD.TLD, the Authority was delegated to Janet by Mary.
I personally use the shorthand, 3LD and 4LD to keep things easy to read.
Everything else (www, mail, janet, student001, nextcloud, and writefreely) are just hostnames. Period.
The webserver listens on its IP address for three hostnames to answer to, and serve pages via HTTP protocol from the corresponding virtual hosts configured for that server. Those three virtual hosts are:
www.lab.math.sld.tld
nextcloud.lab.math.sld.tld
writefreely.lab.math.sld.tld
These three hostnames are virtual hosts on a webserver, configured as "VirtualHost" containers (Apache) or Server Blocks (Nginx). They are not subdomains by any measure, but do exist in the 4LD (subdomain) of lab.math.sld.tld.
Operationally, everything is case insensitive. I only added the caps for emphasis. Most of everything is converted to uppercase by the DNS Servers, however. The reasons for this goes back to the original Jeeves server in the mid eighties.
So the next time some one click install, self-professed so-called *webmaster* says that hostnames are subdomains, you'll know that they're full of shit and don't know what the fuck they're talking about.
I did blur the distinctions between zones and domains for the purposes of this discussion, in order to make things easier to digest. If you want more information you can consult the Internet RFCs, which are the definitive authoritative source, but a great online resource that is an easy read is:
http://zytrax.com/books/dns/ch9/subdomain.html Although this hasn't been updated in about 15 years, I would also highly recommend the old gold standard O'reilly book, DNS and BIND, by Cricket Liu and Paul Albitz, the latter of which is one of the original developers of BIND:
https://www.oreilly.com/library/view/dns-and-bind/0596100574/Having worked with DNS since 1985 when we officially deployed it on the ARPANET/MILNET, I've seen a lot of confusion and misrepresentation surrounding this simple, yet core concept of internetworking.
There have been very few changes in the core concepts of DNS since Jon Postel and Paul Mockipetris published the first RFCs on it, mostly relating to the addition of TLDs and then moving the .ARPA TLD to be used only for reverse DNS in the
in-addr.arpa zone. Paul also wrote Jeeves, the very first DNS server, that we continued to use until about 1987 or so.
I should mention that there is the notion of a 'pseudo' subdomain, with it's own $ORIGIN contained in the parent zonefile, but I won't go into that here and suffice it to say this this not what you did when you thought you had created a subdomain.
The only use case I've ever seen for pseudo subdomains are when infra is being built but the AUTH nameservers haven't been fully deployed yet - like if a school needs to delegate Authority but they're infrastructure didn't have the resources for additional nameservers.
This way, using include files, the administrator of the child domain can affect changes within only their zone, and permission is usually granted so that they can use sudo to affect a reload of named (or whatev DNS server they're using) without having to involve administrators of the parent domain.
You'll see this in things like school districts where the budget can't accommodate the costs of additional DNS servers for each elementary and highschool, as an example, so the tech person at those schools can deploy and retire the ever changing inventory of computing devices at the satellite campus.
In any case, the first link I left you above includes an accurate treatment on how to do just that.
It's certainly NOT what a cPanel server or any web hosting control panel is even prepared to do - they just add new A records for the new hostnames.
I hope that helps! :)
⛵
.
#tallship #Vger #DNS #subdomains #zone #BIND #Jeeves #hostname #recursion #resource_record #delegation #Authority #ORIGIN #SysAdmin #named #virtual_host #web_server #apache #nginx #server_block