Question
How to edit a DNS zone using the WHM API?
Answer
Editing DNS zones can be done using the WHM API using the API call editzonerecord
First, you need to use the dumpzone API call line number of the record, in this example, I am looking for the A record for example.com:
# whmapi1 dumpzone domain=example.com
----SNIP----
-
Line: 15
address: 10.2.32.170
class: IN
name: example.com.
ttl: 14400
type: A
----SNIP---
Now I use the ediitzonerecord to make the change:
# whmapi1 editzonerecord domain=example.com line=15 name=example.com. class=IN ttl=86400 type=A address=192.168.0.20
Additional Resources
Return domain's DNS zone configuration -> dumpzone
Comments
0 comments
Article is closed for comments.