Skip to main content

xmlapi addzonerecord (need to add A Record)

Comments

5 comments

  • cPanelMichael
    Hello, An "A" record is already added for a subdomain during the subdomain creation. Are you attempting to modify the default "A" record that's created automatically? Thank you.
    0
  • TimPhin
    In my previous testing it looked as if I had to create a A record for the domain the sub domain cPanel was created for because they had different IP addresses (doing this in the WHM). But I just did another test via the script and does appear it automatically does it as it does work. Thank you for the quick reply Michael!
    0
  • cPanelMichael
    I am happy to see my response was helpful. Thank you for updating us with the outcome.
    0
  • TimPhin
    Here is a scenario I see happening for me. I may have more than one server running soon. The domain name I will be creating sub domains with will be on server A. But I may need to create an account on server B. Since the main domain is on server A, would there be a way to update the A record to the IP address on server B using addzonerecord for something else? I hope I am making sense. Thank you
    0
  • cPanelMichael
    Hello, You could setup a hook that runs during the account creation or subdomain creation on "Sever B" that runs a custom script designed to update the "A" record on "Server A". The following documentation should help you get started: The hook would call upon your own custom script that creates the "A" record on the remote server. An alternative would be to setup DNS clustering so that zones created on "Server B" are automatically synced. Thank you.
    0

Please sign in to leave a comment.