Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7033723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:05:59+00:00 2026-05-28T01:05:59+00:00

How does DNS second-level domain lookup work? For example, in a url web.example.com, the

  • 0

How does DNS second-level domain lookup work? For example, in a url web.example.com, the top-level domain is .com, and the second level domain is .example. Based on my understanding, after we find a server for the top-level domain, if this top-level server does not actually have a record for the second-level domain, we query a different top-level server. How does DNS decide which next top-level domain server to query? Are there a lot of top-level domain servers in the world (since there are so many second-level names available)? Since there are so many second-level names, how long could this process potentially take?

This is described on wikipedia: http://en.wikipedia.org/wiki/Domain_Name_System#Address_resolution_mechanism, but this section does not explain how to efficiently find the top-level server with the second-level domain info.

The point of my question is how does DNS efficiently search millions/billions of second-level domains.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:05:59+00:00Added an answer on May 28, 2026 at 1:05 am

    DNS second- (and third-, and fourth-) level domain lookup works exactly the same way first-level domain lookup works.

    The description you present in the question is wrong. For example, “if this top-level server does not actually have a record for the second-level domain, we query a different top-level server” is wrong. If one of the servers for a domain does not have a record for a subdomain one level down, that’s the end of the search: the subdomain does not exist.

    A full description of how DNS resolution works is outside the scope of a SO answer, but in a nutshell:

    Starting from the root servers, each DNS server either gives an answer to the question or a referral to another server. Assuming a query for web.example.com, the root servers will give you a referral to the gTLD servers for com.. You will then go query one of those servers. It will give you a referral to the nameservers for example.com. You will now go query one of those servers. It will probably give you an answer (either an error like NXDOMAIN (no such domain) or some records). It could also give you a referral if the subdomain web.example.com has been further delegated to some other servers…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how its possible to retrieve the DNS records for a domain.
In other words, does it matter whether I use http://www.example.com/ or http://wwW.exAmPLe.COm/ ? I've
does anyone know how to resolve an external domain name with Dns.GetHostEntry() behind a
Once a user hits a URL the local machine does a lookup on the
Does anyone have a regular expression handy that will match any legal DNS hostname
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does Dns.GetHostAddresses really get back all registered IPs? That is DNS can have multiple
Does anyone have a good (preferably tested) regex for accepting only a valid DNS
Here's a piece of code I'm using: public void Start() { Dns.BeginGetHostEntry(www.google.com, new AsyncCallback(Stop),
I have this problem. Session does not work when I use with $_POST. If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.