DNS: Adding Multiple Subdomains to hostname

MojoCreations

Active Member
Feb 14, 2012
31
0
56
cPanel Access Level
Root Administrator
I need to add around 100 subdomains to a hostname and would like to know the fastest way of doing that. I don't mind running command line if i need to. Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

If you only require the DNS Zone itself, you could utilize the following script:
Code:
# /scripts/add_dns

Control Flags:
--domain    (required)
    Domain for zone creation

--ip        (optional)
    IP for zone creation. Defaults to server's main shared IP

--reseller  (optional)
    Set reseller (zone administrator) to utilize name server IPs assigned via WHM to the reseller.
    Defaults to using main server name server IPs
You would need to develop a custom script to loop this command for a list of domain names.

Thank you.