Can I configure a DNS zone such that both a.b.c
and b.c
can serve as host names? In other words, can b.c
be both a subdomain and a hostname at the same time?
Is this perhaps just a matter of serving both A
and NS
(for delegation) records for b
in c
's zone?
Yes you can! You also do somethhing similar when making
example.com
andwww.example.com
point to anA
record. You will have to create theA
record on the delegated zone though.You can combine
A
andNS
records but you can’t combine them with aCNAME
record.Note that the terms “hostname” and “subdomain” are kinda synonymous as you can create
A
records forwww.test(.example.com.)
and bothwwe
andtest
are considered a subdomain. You’re talking about a delegation of a zone here. And you can both delegate a zone and assign anA
record to it (from the delegated zone, as its apex).If you only want to have records for
b.c
anda.b.c
subdomains are not necessary. It's completely valid to have more sub-levels in one file, for example in zonefile forc
you can haveIf you really want a subdomain
b.c
first define delegation ic
zonefile.the
ns.with.b.c.zone
can point on the same server, or to hosting provider for example. Is good practice to have at least two DNS server for domain. RFC1912next define
A
record forb.c
in zonefile forb.c
or