Resolving DNS subdomains

1

I'm not sure I understand DNS correctly. Given a computer which has the domain name somecomputer.com, and I setup a DNS server on that computer, will requests for subdomain.somecomputer.com go through that DNS server?

simonzack

Posted 2014-08-26T19:27:00.840

Reputation: 239

1>

  • Only if you create a zone in the DNS server for somedomain.com AND 2. Only for the clients that query that DNS server for somedomain.com.
  • < – joeqwerty – 2014-08-26T19:30:01.897

    Will this happen automatically if subdomain.somecomputer.com cannot be resolved from other dns servers? – simonzack – 2014-08-26T19:38:18.637

    1No it won't. DNS clients need to know to ask your server. That isn't automatic. For a public DNS zone you need to register your DNS server(s) with your domain name registrar. For a private domain you need to configure your clients to use your DNS server for DNS. – joeqwerty – 2014-08-26T19:39:46.037

    Answers

    2

    When you say "has the domain name", I'm guessing you meant "the example.com A/AAAA records point to the computer's IP address". If that's the case, the answer is no – it has absolutely no effect on how the subdomains of example.com are resolved.

    Rather, DNS has a different record type – the NS record – that delegates a sub-domain to another DNS server. For example, the com domain has example.com NS pointing at your registrar's (or your own) DNS servers.

    Regarding your "Will this happen automatically" comment: Unlike some other protocols (e.g. SMTP with its MX records and fallback to A/AAAA), the domain name system itself is quite strict about this. When you query a DNS server about any name, it can either return the data directly; or point you elsewhere by returning NS records; or admit that it doesn't know that name. There are no other options.

    user1686

    Posted 2014-08-26T19:27:00.840

    Reputation: 283 655