Saturday, January 29, 2011

How are subdomain resolved?

Hi, quick question for you, when I enter adress like test.mysite.net, first I connect to my ISP DNS, than if not found there to .NET DNS, than to mysite DNS, what after that?

I mean, I know that test.mysite.net could be at different IP adress, but what if I want to run virtual server there? I get the same IP as mysite.net has, and how does server know wheather I want to reach for test.mysite or mysite directly, if they have same IP adress ?

  • This isn't a tricky question.
    It's basic DNS operations to evaluate in the order of .net -> mysite.net -> test.mysite.net, passing the request from one domain DNS server to another.

    See How Lookups Are Handled for a graphical explanation.

    grawity : It's actually `.` -> `net.` -> `mysite.net.` -> `test.mysite.net.`
    harrymc : @grawity: I believe this is optimized, to avoid the entire world soliciting one poor DNS master server.
    dsolimano : @harrymc, you can see the DNS root servers here - http://www.root-servers.org/. Looks like we're up to around 200 physical servers backing up the 13 root server names. But yes, I believe the load on the roots tends to be intense. DNS software will often cache responses so it will know `net.`, but when the cache expires it will go back to `.` to refresh.
    From harrymc

0 comments:

Post a Comment