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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:23:40+00:00 2026-05-15T10:23:40+00:00

I’m playing with DNS record lookup in PHP and am running into something confusing.

  • 0

I’m playing with DNS record lookup in PHP and am running into something confusing. I’ve looked up 2 different domains each using different hosts and different authoritative name servers. Both of these domains I know for certain have CNAMES.

I’ve looked up DNS records using this online tool: http://network-tools.com/
I’ve also looked them up using PHP’s dns_get_record. A, NS, SOA, MX, etc. all come back. But no CNAMES. I get false/empty array.

In both cases I can log into the DNS control for these domains and see the CNAMES.

Why in the world would this be happening? The goal is to allow lookup and saving of all of the DNS records at the time prior to changing a client’s domains to my company’s nameservers (so that we don’t accidentally externally hosted e-mail settings). CNAMES like pop.domain.com are going to be reasonably critical here, but no lookup I can find will admit they exist.

The real problem is of course the PHP function not returning them, since that’s really where I need it.

But it confuses me that I can’t find them elsewhere. Especially because I’m looking right at them in the place where I can add and remove DNS records. Says right here:

pop.domain.com CNAME pop.secureserver.net 0 900

(PHP Version 5.2.6
Linux 2.6.9-67.0.15.plus.c4smp)

  • 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-15T10:23:41+00:00Added an answer on May 15, 2026 at 10:23 am

    I think I’ve figured out why. I believe this has to do with “Zone Transfers” per this thread Is it possible to find all DNS subdomains for a given domain name?.

    What I expect is the same functionality from the CNAME lookup as A, NS, MX–EVERYTHING ELSE. (Hardly an unrealistic expectation…)

    dns_get_record("domain.com", DNS_CNAME, $authns_cname, $addtl_cname);
    

    I expect to get back an array populated with all the CNAMES set up for domain.com. That’s not what happens.

    • I can get back the single CNAME
      entry for “www.domain.com” if that is
      the domain I pass in and there is a CNAME for it.
    • I can get
      back the single CNAME entry for
      “*.domain.com” if that is the domain
      I pass in and there is a CNAME for it.
    • I cannot get back
      literally all the CNAME records in order to save a record of all the CNAMES/subdomains/third level domains
      for domain.com, wildcard search or
      not.

    I suppose I just had to phrase the question right (15th permutation found that promising answer). I assume both name servers (Dreamhost and my company’s) are “protected” against this. Though it seems to me not to be terribly sensitive information in comparison to the rest of the DNS records.

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

Sidebar

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.