The A
record for hello.world.example.com
can be registered
- as the
hello
entry in the domainworld.example.com
- or as the
hello.world
entry in the domainexample.com
Is there a practical difference, from the perspective of the services which resolve the name, between these two approaches?
As far as I can tell, the resolution of both of them yields the value A record (the IP) so the replies are not discernable for the client.
There will be potentially be an extra delay as creating a separate zone for the
world.example.com
subdomain typically also implies delegation to different authoritative name servers.If the same authoritative nameservers are used for both the
example.com
and theworld.example.com
zones there is no performance difference.DNS resolvers need to follow the delegation from the TLD to an authoritative name server.
When the resolver reaches authoritative name servers for the
example.com
domain and you have a resource record forhello.world(.example.com.)
in that zone a response will sent immediately.If the authoritative name servers for the
example.com
domain are also authoritative for theworld.example.com
sub-domain, the response for thehello.world.example.com.
record will also be sent immediately.If
world.example.com
is configured as separate a zone the authoritative name servers for theexample.com
will send a response with further delegation details and theNS
record(s) of authoritative name servers for theworld.example.com.
zone:The resolver will need to follow that delegation and sent extra queries to:
world.example.com.
zone for thehello(.world.example.com.)
record.Technically, as I understand DNS, only the
hello
part is considered the host name, the rest is the domain name. As such, it resolves the same way, in your case the DNS zone includes both theexample.com
and the subdomainworld.example.com
, it's just a matter of preference how you annotate it.However, the only time I've ever seen records like that are for DKIM and other TXT records, for example DKIM uses
[selector]._domainkey
as the record for a given subdomain or the root domain. Handy of course if you only need a couple of records for a subdomain, no need to create a separate zone for them.