Skip to main content

List of Subdomains

Comments

17 comments

  • cPRex Jurassic Moderator
    Hey hey! The closest thing I have would be this tool:
    0
  • Amiga500
    Hi. Is there a known issue with WHM/Account Information/List Subdomains, feature? It's not listing all of our subdomains. If this worked then I'd have a list of all our subdomains with their parent domain. This is exactly what I'm looking for but it's not working correctly for some reason. I know of other subdomains that are not listed.
    0
  • cPRex Jurassic Moderator
    I'm not aware of an issue with that page at this time, and when I create a bunch of subdomains on a test system, they all show up properly. Does that API call give you different output than the WHM >> List Subdomains page?
    0
  • Amiga500
    I get this when I try to run: https://{host}:{port}/json-api/get_domain_info (with our server info filled in) {"cpanelresult":{"apiversion":"2","error":"Token denied","data":{"reason":"Token denied","result":"0"},"type":"text"}} I also tried:
    0
  • cPRex Jurassic Moderator
    That URL "looks" fine to me. You'll want to log in first, then edit the URLto only keep the hostname and token portion, and I'd expect that to work.
    0
  • Amiga500
    I tried two different URL's above. Can you show me which one I should use? I was logged in when I tried either one but that didn't help. So, maybe the URL itself needs to be modified?
    0
  • Amiga500
    I think I figured it out. I used the token from the URL where I'm logged into the server and inserted that into this URL:
    0
  • Amiga500
    The output data I think is correct but its not formatted correctly. The text is spread out from left to right on the screen rather than the format you show above. I guess I just need to figure out how to format the output so it's more usable.
    0
  • Amiga500
    In looking at the data, I still don't see all the subdomains. What I think is going on is that this report only shows subdomains that have their own document root. If they share the document root with the parent domain then it doesn't show on this report. I have one account/domain which has 4 subdomains, only one shows up on this report and it's the same way when I look at the subdomains from WHM/Account Information/List Subdomains. The one subdomain that shows up is the one that was created with a separate document root. The other three share the document root with the parent domain.
    0
  • cPRex Jurassic Moderator
    If a domain shares a document root, it's considered a parked domain on the system, even if it's in a sub.domain.com format.
    0
  • Amiga500
    Okay, so that answered my question about what is a parked domain because I saw that under the WHM/Account Information/List of Subdomains. But, either way, there's still subdomains missing from the reports. As I mentioned above, the one domain in question (there may be more but this is one I noticed), has 4 subdomains. One of them has its own document root and is the only subdomain that shows up in the report under the parent domain. The other three domains that share the document root with the parent domain are not on the reports.
    0
  • cPRex Jurassic Moderator
    That sounds like it's working correctly then, at least to me. Anything with a shared document root wouldn't show up in those reports.
    0
  • Amiga500
    Then we are back to my original question. How do we get a list of all subdomains? Also, the report it gave me was not formatted as you showed above. Not sure how to format the text so it's a bit more usable. But in any case if it's not going to show all subdomains the report is useless to me.
    0
  • cPRex Jurassic Moderator
    I think we need to clarify our terms a bit. A subdomain is a separate Apache vhost entry where different content lives. A park/alias is just another entry in the Alias line in the Apache vhost. Based on what we're describing here, you are being shown all the actual subdomains on the system. Just because they happen to be in the format of sub.domain.com doesn't mean they are really a subdomain, as they could be a park. It sounds like things are working as intended.
    0
  • cPRex Jurassic Moderator
    I also did want to mention that "spread out" version is normal when running the command in a browser. Mine was run over SSH, which does result in prettier output.
    0
  • Amiga500
    This is what I'm referring too. In WHM, I go to List Accounts. I create a new account/domain. After creating that account/domain I go to cPanel for that account/domain and then under Domains/Domains I create a new domain. This is what I refer to as a subdomain. I want a list of all domains including what I call subdomains which reside under a parent domain. If we need to address something for that subdomain, it doesn't show up under List Accounts, and there's no easy way to search for it. You would have to know/remember which domain it resides under to find it. Since the WHM/Account Information/List Subdomains doesn't show everything then there really is no easy way to find it (especially if the subdomain shares a document root). We manage all these domains and subdomains, not our customers. So, if our Help Desk needs to find a particular subdomain (customer wants to add more mail accounts), and doesn't recall which parent domain it's nestled under, then they would have to look up the customer in our database to figure it out first creating more work/time etc........ I guess it would be nice to be able to search for all domains from the List of Accounts.
    0
  • cPRex Jurassic Moderator
    Great - so we've clarified the terms :D. Just because you call it a subdomain doesn't mean that cPanel does. I think you'll get better use out of this guy: Return all domains information That shows ALL the domains on the system, no matter what type there are or how they are configured.
    0

Please sign in to leave a comment.