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 8034989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:10:51+00:00 2026-06-05T02:10:51+00:00

I’ve been trying to find out how to detect what parent nameserver is associated

  • 0

I’ve been trying to find out how to detect what parent nameserver is associated with a domain name. For example, when you search for a domain name using intoDNS, it displays results for both the ‘normal’ and parent nameservers. They mention what the parent nameserver is, like this:

k.gtld-servers.net was kind enough to give us that information.

But how did they know they had to query this specific nameserver? A few examples of what the parent nameserver is:

stackoverflow.com   k.gtld-servers.net
google.com          c.gtld-servers.net
ycombinator.com     a.gtld-servers.net
asp.net             g.gtld-servers.net
google.nl           sns-pb.isc.org
google.de           z.nic.de

It seems all generic TLDs can be queried at a certain subdomain of gtld-servers.net.

Right now, I find the ‘normal’ nameservers in PHP like this:

$nameservers = dns_get_record($domain_name, DNS_NS);

So, I’d like to know, how can I find out what the parent nameserver is for a specific domain and how can I query this using PHP?


Update

I’ve found out that UNIX’ nslookup tool accepts a server parameter. If it’s left empty, it returns the same results as PHPs dns_get_record, but if it one of the root servers for that top-level domain as specified on http://www.iana.org/domains/root/db, it will return the same results as intoDNS lists as the results of the parent server.

The only problem left is how to query this specific server, as I’d greatly prefer not to use exec() to call nslookup directly. Does anyone know of an alternative to dns_get_record which does allow you to specify the server?

  • 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-06-05T02:10:52+00:00Added an answer on June 5, 2026 at 2:10 am

    I’ve found out how to do it. I had to use NET_DNS2 PEAR package for this, because it allows you to specificy which DNS server to use. If I specify one of the servers listed in the file nickc mentioned:

    http://www.iana.org/domains/root/db

    (you have to use one of the servers for the top-level domain you’re querying, it doesn’t matter which one)

    require 'Net/DNS2.php';
    
    $server = gethostbyname('j.gtld-servers.net'); // 192.48.79.30
    
    $r = new Net_DNS2_Resolver(array('nameservers' => array($server)));
    $result = $r->query('stackoverflow.com', 'NS');
    
    print_r ($result);
    

    This will print:

    ...
        [authority] => Array
            (
                [0] => Net_DNS2_RR_NS Object
                    (
                        [nsdname] => ns1.webfaction.com
                        [name] => webassay.com
                        [type] => NS
                        [class] => IN
                        [ttl] => 172800
                        [rdlength] => 17
                        [rdata] => ns1webfaction�
                    )
    
                [1] => Net_DNS2_RR_NS Object
                    (
                        [nsdname] => ns2.webfaction.com
                        [name] => webassay.com
                        [type] => NS
                        [class] => IN
                        [ttl] => 172800
                        [rdlength] => 6
                        [rdata] => ns2�.
                    )
    
                [2] => Net_DNS2_RR_NS Object
                    (
                        [nsdname] => ns3.webfaction.com
                        [name] => webassay.com
                        [type] => NS
                        [class] => IN
                        [ttl] => 172800
                        [rdlength] => 6
                        [rdata] => ns3�.
                    )
    
            )
    ...
    

    This matches the nameservers listed as returned by the parent server at intoDNS: http://www.intodns.com/stackoverflow.com

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:

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.