set IP for creating domain or subdomain in DNS record
Hello
i have Cpanel server with IP : X.X.X.X
when i create a account or subdomain, it was created with Cpanel ip in DNS A records, but i want when i create new domain or account, it create with my arbitrary A record IP like X.X.X.Y in DNS records. ( domain point to my IP)
my webserver Isolated from Cpanel server and website should point to webserver IP.
Can anyone help?
-
Hi, Check what IP address is set to default in the WHM basic configuration section. This will be the one that will be used when a new account is created.. 0 -
Hello Cpanel IP address set in basic configuration WHM but web servers IP is different. I want when create Sub domain, it create with webserver A record in DNS service instead of Cpanel IP address. thanks 0 -
Hello, You can modify the zone templates using "WHM >> Edit Zone Templates": Edit Zone Templates - Version 70 Documentation - cPanel Documentation Could you let us know if this allows you to setup what you are looking to do? Thank you. 0 -
Hello, You could develop a custom bash script that manually modifies or adds to the DNS zone through the manipulation of the corresponding zone file in the /var/named/ directory. Then, configure that custom script to automatically run upon the creation of new subdomains via a hook event: under the "Development" tab in "WHM >> Tweak Settings". Then, perform the specific action you want to hook into via cPanel or WHM, and watch the output in /usr/local/cpanel/logs/error_log. For example, the following cPanel API 1 function is utilized when adding an Alias in cPanel: Cpanel::Api1::Park::park You can find documentation on hooks with cPanel functions at: 0
Please sign in to leave a comment.
Comments
5 comments