# DNS Zones DNS / DNS Zones ## Create DNS zone - [GET /adddns](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/adddns.md): This function creates a DNS zone. If , this function does the following: * Adds a DNS entry in the file, where represents the parameter's value. * Creates the file, where represents the new zone's domain. * Creates the file, where represents the new zone's domain. When you call this function, the system uses the domain name and IP address that you supply. WHM's standard zone template determines all other zone information. This function generates the DNS zone's MX record, domain PTR, and A records automatically. When you disable the DNS role, the system this function. You use this function to add temporary domains. ## Return whether DNS cluster server can share records - [GET /cluster_member_has_trust_with](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/cluster_member_has_trust_with.md): This function queries whether nameservers in a DNS cluster can share records with one another. Servers in a DNS cluster exist in a Reverse Trust relationship to share information. This relationship requires each server to have an API token. DNS servers in a Write-Only role do not need to exist in a Reverse Trust relationship. For more information, read our Guide to DNS Cluster Configurations documentation. ## Update DNS zone record - [POST /editzonerecord](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/editzonerecord.md): This function edits a DNS zone record. To effectively use this function, use the following workflow: 1. Run the function on the DNS zone record to edit. 1. Locate the value that corresponds to the data to edit. 1. Use the values from that zone record to formulate the appropriate parameters. * When you call this function, you include the additional parameters for the selected zone record type. * To change the zone record's IP address, we recommend that you use the script or the function instead. Write-only* servers in a DNS cluster. On servers that run CentOS 7, you may see a warning about the absence of SPF resource records on DNS. * This warning is relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain , which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors. When you disable the DNS role, the system this function. ## Export domain's DNSKEY record value - [GET /export_zone_dnskey](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/export_zone_dnskey.md): This function exports a domain's DNSKEY record value. ## Export DNS zones in zone file format - [GET /export_zone_files](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/export_zone_files.md): This function returns one or more DNS zones, in RFC-1035 format. When you disable the DNS role, the system this function. ## Return specific line from domain's DNS configuration - [GET /getzonerecord](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/getzonerecord.md): This function returns a line from a domain's DNS zone configuration. On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS. * This warning is relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain , which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors. When you disable the DNS Role, the system this function. ## Delete DNS zone - [GET /killdns](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/killdns.md): This function deletes a DNS zone. - The WHM API 1 adddns function adds an XDNS entry for a domain in the following locations: - The file, where represents the domain's owner. - The directory, where represents the new zone's domain. - The directory, where represents the new zone's domain. - This function does automatically delete these entries. You manually delete these entries, or you use this domain as a value in other API functions. - You cannot delete other DNS zones that reside on servers in a DNS cluster. When you disable the DNS role, the system this function. You use this function to delete temporary domains. ## Return server's DNS zones - [GET /listzones](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/listzones.md): This function lists the server's DNS zones. When you disable the DNS role, the system this function. ## Update a DNS zone - [GET /mass_edit_dns_zone](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/mass_edit_dns_zone.md): This function updates a given DNS zone. It can add, edit, and remove many records in a single call. It also ensures that each record not removed will occupy the same number of lines after the edit as it did before the edit. You use this function to modify temporary domains. ## Return a parsed DNS zone - [GET /parse_dns_zone](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/parse_dns_zone.md): This function parses a given DNS zone. Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function's base64 output be able to handle cases where the decoded octets do not match any specific character encoding. ## Delete DNS zone record - [GET /removezonerecord](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/removezonerecord.md): This function deletes a DNS zone record. Incorrect use of this function could cause domains to resolve incorrectly. Exercise when you remove DNS zone records. To effectively use this function, use the following workflow: 1. Run the function. 2. Locate the value that corresponds to the zone record to delete. 3. Use the values from that zone record to formulate the appropriate parameters. * When you disable the DNS role, the system this function. * You use this function to modify temporary domains. ## Update reverse DNS cache - [GET /update_reverse_dns_cache](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/update_reverse_dns_cache.md): This function queries DNS and updates the map of local IP addresses to reverse DNS names. ## Return domain's DNS zone configuration (deprecated) - [GET /dumpzone](https://api.docs.cpanel.net/specifications/whm.openapi/dns-zones/dumpzone.md): This function returns a domain's DNS zone configuration. * This function is . Use WHM's function. * You include either the or the parameters. * When you disable the DNS role, the system this function. On servers that run CentOS 7, you may see a warning about the absence of SPF resource records on DNS. * This warning is relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain , which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.