Does a multi-level hostname makes a practical difference?
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 the world.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 for hello.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 the world.example.com
sub-domain, the response for the hello.world.example.com.
record will also be sent immediately.
If world.example.com
is configured as separate a zone the authoritative name servers for the example.com
will send a response with further delegation details and the NS
record(s) of authoritative name servers for the world.example.com.
zone:
world.example.com. IN NS ns.world.example.com.
world.example.com. IN NS ns1.example.org.
; GLUE
ns.world.example.com. IN A 192.2.0.1
The resolver will need to follow that delegation and sent extra queries to:
- potentially locate those name servers (for example in the case of the ns1.example.org. NS record)
- query one of the authoritative name servers for the
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 the example.com
and the subdomain world.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.