Edit DNS zones from Child Domains

At this moment you cannot edit dns zone froms child domains, like if you have domain qwerty.com and a child domain abc.com, you cannot create a DNS for 123.abc.com.

I am currently having the same problem I am trying to add an MX record in a Child Domains and it does not let me do not leave the domain in the box to change the records, did you manage to do it?

Investigating the same problem here. It seems:

  • DNS zones are only editable for domains which are a websiteā€™s main domain, child domains donā€™t show up in editable/deletable DNS zones.
  • When trying to manually add zones in CyberPanel, it shows error : ā€œCannot create DNS Zone. Error message: (1062, ā€œDuplicate entry ā€˜<domain.name>ā€™ for key ā€˜nameā€™ā€)ā€.

I just tried this, but I get the same error.

  1. Deleting the child domain
  2. Adding the zone manually (doesnā€™t work)
  3. Re-creating the child domain

So it also seems:

  • CyberPanel doesnā€™t clean up DNS data left behind when deleting a domain.

Testing with a new (imaginary) domain:

  1. Creating the zone manually first (success message, but actually fails)
  2. Adding domain as child domain
  • Adding the domain first show a success message, but the domain doesnā€™t show up as editable/deletable, so thereā€™s no point of moving to step 2.
  • Subsequent tries to re-add the domain shows the same ā€œDuplicate entryā€ error message as above.
  • We now know that ā€œcleaning upā€ old DNS data left behind wonā€™t solve our problem.

So now I find myself poking my dirty fingers inside CyberPanelā€™s database.

  • In Database > PHPMyAdmin, DB ā€˜cyberpanelā€™, we find THREE relevant tables : ā€˜domainsā€™, ā€˜e_domainsā€™ and ā€˜websiteFunctions_websitesā€™
  • Table ā€˜domainsā€™ has more domains than available as editable/deletable zones ā€“ but itā€™s not consistant with the domains that fail to be manually created (some are there, some are missing ā€“ for instance my imaginary domain doesnā€™t show up here)
  • Table ā€˜e_domainsā€™ almost perfectly matches the editable/deletable domains (one is missing from the tableā€¦)
  • Table ā€˜websiteFunctions_websitesā€™ matches perfectly the list of editable/deletable domains (even the ordrer)!

And that just makes me realize that the list of editable/deletable zones is a perfect match of CyberPanelā€™s list of actual websites. No more, no less, same ordering (oldest first).

Conclusion: the only way to edit the DNS zones of a domain in CyberPanel is to use it as the main domain for an actual website. There is no way to edit zones for add-on domains.

Then:

  • Whatā€™s the point of the ā€œCreate DNS Zoneā€ function, if you canā€™t edit the created zone?

@biguenique So does that mean, if there is a child domain with unwanted dns entries ( I have A records with blank values which I want to remove), we would need to convert it to main website first and then remove? I guess there are still some hidden entries in dns zones. @usmannasir can you help in telling how to cleanup dns entries of child domains?

Has there been a solution or update to this issue?
I am trying to add some records for child domains and am unable to find a way to do it.

  1. primary domain using NS to your server or other DNS hosting like namecheap cloudflare etc

  2. You have 2 choices to use child domain:
    2.1. create new website
    2.2. create domain inside primary domain

please answer number 1 and 2
i hope i can help you understand how to manage NS rather than just asking you do this, do that, and you still not understand how it work

Thanks for the quick reply.

I have a primary website using the NS (ns1.domain.com, ns2.domain.com) that cyberpanel manages. Thatā€™s working fine. I can add/remove dns records for that website.

I would like to put child domains under that primary website and still be able to add/delete dns records for that child domain.

So, I am asking about 2.2 create domain inside primary domain, and still be able to add/delete dns records for that child domain.

you want to try add zone record only or with website
if with website you can use add domain
if you want just add
subdomain.domain.tld IN A to other server
just go to :8090/dns/addDeleteDNSRecords
image

if you want to add your-free-sub.eu.org
try this trick

add primary eu.org :smiley:
then point subdomain.eu.org IN NS to your cyberpanel DNS
then add domain :smiley:

Yes, that part is working fine. There is no problem there with adding websites and child domains. The part where there is a problem is (for example), when I want to add MX records for a child domain so that a client can use a Google Workspace email with their child domain.

I will explain some background on my situation and maybe it will make more sense. (Note: the forum was not letting me post my reply with more than 2 links, so I replaced all the ā€˜dotsā€™ with ā€˜commasā€™ so that they donā€™t show up as links. For example, child1.com was changed to child1,com)

I have clients using my server to host their websites. Some clients have more than one website. I am using CyberPanelā€™s ā€œPackagesā€ feature to manage the clientā€™s storage, website and bandwidth usage. Since CyberPanelā€™s ā€œPackagesā€ are attached/assigned to websites at the upper ā€œwebsiteā€ level, clients sign up using a primary/parent domain (for exampleā€¦ parent,com). Then, all additional websites they want to add are added as child domains (for exampleā€¦ child1,com, child2,com, or even subdomain,parent,com etc).

Clients are only allowed 1 website at the upper ā€œwebsiteā€ level, because the ā€œPackageā€ feature is able to keep track and limit how much storage, band width and child domains they are using based on the one website and its many child domains. I believe I am using the ā€œPackagesā€ feature correctly. Many other web hosts work similarly where you sign up with a primary parent domainā€¦ then when you add additional domains, they are organized as child sites beneath that parent domain.

So, adding the parent website and child domain websites is not a problem. That all works fine. Also, adding MX entries to the parent website works fine. (for example, if the client wanted to set MX entries of parent,com to use Google Workspace for their info@parent,com email, that works fine.

BUT, the problem comes when they want to also add Google Workspace email for their other child sites like info@child1,com or user@child2,com. I am unable to add MX entries to those child websites to enable Google Workspace to work with their child domains.

I understand that I can get around this by adding their child domains as ā€˜upper levelā€™ websites, on the same level as the parent,com domain. However, since the ā€œPackageā€ feature keeps track of storage, bandwidth, etc based on the website the package is assigned to, plus all of its child domains, I would lose the ability to track the clientā€™s usage. If I add the child1,com domain as an ā€˜upper levelā€™ website, I would need to assign a second ā€œPackageā€ to that child1,com.

I hope this makes sense. Let me know if something is unclear.

ok, i 99.99999% understand the situation

this is your main problemā€¦ isnt it?..
i was experiment about this few weeks ago


there is no problem occurs with those MX recordā€¦

you mean your user ?
if soā€¦ well i never try about that.
wait a minā€¦ i will try create package for user :smiley:
i use this vps for testing purpose and never use user account lol

add the DNS Zone manually
:8090/dns/createDNSZone
then go to client account edit the DNS Zone from their login
but before that you must create or edit user ACL checklist the add/remove edit NS
image

i hope im not miss understand

If you look up the MX entries of the 3 domains you have there:

  • belanja,eu,org
  • dodol,eu,org
  • eu,org
    Using this site: Network Tools: DNS,IP,Email
    It shows that belanja and eu have different MX entries, but dodol has no MX entries:
  • belanja shows improvmx,com entries
  • eu,org shows smtp,eu,org entries
  • dodol shows no MX entries

Where did you set the MX entries for blenanja,eu,org and eu,org?

eu.org is not mineā€¦ eu.org is free subdomain provider

for that example (that you mention) they still use internal MX
but before that. i was point the MX to my CWP server (external MX record)

that is only simulation not active domainā€¦
dodol = not my subdomain either
i just use a simple name to test add subdomain and some experiment

When adding child domains, some clients are not just adding subdomains of their parent site, although they may have a mix of other domains and subdomains of the parent. For example, their account website structure might be like this:

parent,com (parent website)

  • child1,com
  • child2,com
  • subdomain1,parent,com
  • subdomain2,parent,com
  • other-name,com

For any of the child domains, especially the ones that are not subdomains of the parent, how can I set the MX entries for those, or also other TXT entries?
For example, how can we set the MX entries and TXT entries for other-name,com?

(I am heading to sleep now. I will check back in the morning. Thank you for your replies. I appreciate it)

try to create new package
itā€™s more easier if use new package

Ok, I did that.
I logged in as client user, I go to DNS > Add/Delete Records.
The only domain I can select is their parent website domain.
If I go to add a DNS zone that matches any of their child domains, it says that it cannot create it because there is already a DNS zone that exists for that child domain.
But when I go to DNS > Add/Delete Records, I am unable to select that child domain. Only the parent website domain shows up.

did you already add domain for those child ?

Yes, the website for child domains is installed and up and running.

this is what i think about the cyberpanel ā€œlink-tree errorā€ need new restructure (cc to mr @usmannasir )

ok back to your question

you cant edit NS if you add as a domain. you should edit/add manually from websiteā€™s NS zone

Iā€™m not sure what you mean by this. By ā€œedit NSā€, you are referring to adding DNS entries like MX and TXT?

By ā€œedit/add manually from websiteā€™s NS zoneā€, do you mean add DNS entries for the child domains by going to the parent websiteā€™s DNS entry page and add child domain entries there in the same list?