0

Let's a hostname is HelloWorld.com, and it has a alias name hw.com, so when the application on my host want to know the ip address of hw.com, this DNS query goes to the Authoritative DNS server of HelloWorld.com. Is my understanding correct:

1.the Authoritative DNS server has a CNAME type record e.g. (hw.com, HelloWorld.com, CNAME) to associate alias hostname and canonical hostname.

2.When Authoritative DNS server receive the query, it first check all CNAME record that has alias hostname to be hw.com so it retrieves canonical hostname HelloWorld.com, then it uses this canonical hostname to get and return ip adress by locating the Type A record (HelloWorld.com, 145.37.93.126, A)

so basically the Authoritative DNS server does two queries internally?

1
  • CNAMEs are handled specially, so that the server will perform a subquery for the ARec name. Then it will return the cname and the IP of the Arec. Note that this is different from iterative/recursive resolution, where the server might just return a token of the path, leaving the client to do the rest of the work with subsequent queries, or might perform all the work itself resolving each path token and returning only a single response for the full path. en.wikipedia.org/wiki/CNAME_record Commented Aug 7, 2020 at 1:58

1 Answer 1

2

Nope, the process is a bit different. The CNAME record is passed to client and client requests the original host name after that.

First your client (a browser) requests hw.com. Now your DNS server takes the request and finds the authoritative DNS server containing the zone file for records of helloworld.com. Request is resolved and client gets the CNAME record. Now the client from the CNAME record understands that hw.com is just an alias for helloworld.com and creates a new DNS query, and this time it gets the record for helloworld.com with its IP address. Now the client connects to the IP address of helloworld.com.

So that means when alias is requested, server only returns CNAME record and later client creates new DNS query for original alias.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .